How to make player not move forward and backward

Hello everyone.

I would like to know on how you make the player not move forward and backwards, but move left and right.

(Like in 2d platformer games.)

I was reading about what a ControlModule, but i couldnt really understand what it meant. (I think it will help me accomplish my goal when i know what it is)

Screenshot 2022-08-25 214333

Help would be appreciated, thank you.

2 Likes

GnomeCode has located the function to remove the Z axis from the player move vector in the control script.

There’s also the second method which he covers which creates another custom control script which is in the video.

3 Likes

i apologize for replying so late, but where would i find the first method in? (please be a little bit more specific.)

you can make a new localscript and unbind the keys like so :

local ContextActionService = game:GetService("ContextActionService")
ContextActionService:UnbindAction("forwardMovement")
ContextActionService:UnbindAction("backwardMovement")

This did not work at all.

@dthecoolest gave me 2 options, the second option i did, but it would interfere with my camera.

the first option i wanted to try out, but i cant find this “ControlScript” that is inside of my StarterPlayerScripts. (i think it was replaced by playermodule)