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

How do I disable W and S?

I've been searching for hours and found a few tutorials on how to do this but I think they are outdated. I've tried using PlayerModule>ControlModule but can't seem to find the line for it. I'm trying to find a current script for this.

1 answer

✓ Accepted answer

This is quite easy. Put a Local Script into StarterGui and this code should work.

local ContextActionService =game:GetService("ContextActionService")
local FowardMovement = Enum.PlayerActions.CharacterForward
local BackwardMovement = Enum.PlayerActions.CharacterBackward

local function Sink()
	return Enum.ContextActionResult.Sink
end

----Sink forward movement 
 ContextActionService:BindAction("SinkFowardMovement", Sink,false,FowardMovement)

----Sink backward movement 
 ContextActionService:BindAction("SinkBackwardMovement",Sink,false,BackwardMovement)

1 comment

0

Thanks, this worked

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