Hello! So I making a 2D fighting game. And the problem is to make player move only left and right. How can I do this?
Unbind the moveBackwardAction and moveForwardAction bindings locally and set StarterPlayer.EnableMouseLockOption to false. Example localscript in StarterCharacterScripts
game:GetService("ContextActionService"):UnbindAction("moveBackwardAction")
game:GetService("ContextActionService"):UnbindAction("moveForwardAction")
5 Likes
Thank you very much! That worked!
This seems to have been updated to:
ContextActionService:UnbindAction("forwardMovement")
ContextActionService:UnbindAction("backwardMovement")
1 Like