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

How do I disable W and S?

Asked by 3 years ago

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

Log in to vote
0
Answered by 3 years ago

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)
0
Thanks, this worked Papa_Frank420 14 — 3y
Ad

Answer this question