Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I disable the WSAD keys and spacebar-jump with a script?

I found it on the wiki before, but now I find it

2 answers

You can disable the users input by removing the HumanoidController and instancing a new one when you need to enabled the movement.

Disable users input:

game:GetService("ControllerService"):ClearAllChildren()

Enable users input:

Instance.new("HumanoidController", game:GetService("ControllerService"))

I'm not sure if you can completely disable the keys, but to prevent movement you can Anchor/Lock a characters Torso with a Script, thus preventing them to move.

This discussion is preserved as it was. New answers, comments, and votes are closed.