Im trying to find a way to stop the player’s character from moving in other direction. For example when a player is hold W, then they will only walk in that direction until the script allow them to move in other direction, is there a way to do that?
You could either change the key binds (probably preferable) or make a more hacky solution by just using UserInputService and setting walk speed to 0 every time the player enters said key.