Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do i make a character to not walk forward and backwards?

Asked by 10 years ago

I don't have a script because i have no idea on how to make a script that makes a character to not walk forward and backward (button w and s). If you know those 2D games that has in roblox that the characters cannot walk forward or backwards, only left and right, that is what i want. You dont need to make an entire script for me, just explain how to do it.

1 answer

Log in to vote
1
Answered by 10 years ago
game:GetService("ControllerService").Instance:UnbindButton("w")
game:GetService("ControllerService").Instance:UnbindButton("s")

may work im not sure

1
dosent work. what you could do is when the player presses w or s his walkspeed changes to 0, but when he presses a or d it changes to 16 jbjgang2 37 — 10y
0
Didn't worked, im still editing this part of the script DragonOfWar900 397 — 10y
0
oh ok, i know how to do that, thanks for the advice DragonOfWar900 397 — 10y
0
yes i made it and it working perfectly DragonOfWar900 397 — 10y
Ad

Answer this question