public GameObject playerHead;public GameObject character;void Update(){ //check if the head is at a specific angle and if the mouse is moving if (playerHead.transform.localRotation.x >= 0.59f && Input.GetAxis("Mouse X") < 0) { //rotate the body at the speed of the mouse transform.Rotate(new Vector3(0, Input.GetAxis("Mouse X"), 0)); //repeat } else if (playerHead.transform.localRotation.x <= -0.59f && Input.GetAxis("Mouse X") > 0) { transform.Rotate(new Vector3(0, Input.GetAxis("Mouse X"), 0)); }}