It should change the player\'s position after the y is under -20: I am sure that the problem is with the this.transform.position = new Vector3(0, 2, 0); bec