Why is player unable to move after transform.position?

In the game, the player is on a plateau type environment and whenever they fall and pass below a certain point (y = 90) the player is transported to the last checkpoint they activated (or starting point if none have been). However, after being transported to this checkpoint, the player is unable to move but is able to look around. Here is the code I am using for the checkpoint and player controller.


    public class Checkpoint : MonoBehaviour
    {
        void OnTriggerEnter(Collider collider)
            {
                if (collider.tag == "Player") 
                {
                    Debug.Log("Checkpoint updated.");
                    GameVariables.checkpoint = transform.position;
                }
            }
    }
    ```
    
    ```
    public class FallDetect : MonoBehaviour
    {
        void Awake()
        {
            GameVariables.checkpoint = transform.position;
        }
    
        void Update()
        {
            if (transform.position.y < 90)
            {
                transform.position = GameVariables.checkpoint;
            }
        }
    }

Hello.

Are you sure GameVariables.checkpoint position is not y<90 ? If is still true, Update() is changing its position each frame, so you restart allframes from GameVariables.checkpoint position.

If the probem is not that, then another script is interacting, or lines you doidnt post

Bye!