Dear developers,
I used this script, in LocalScript.
The WASD keys no longer work as I wanted them to.
But also, the UIS service stopped working for me (only for WASD keys)
How can I make it so that I can’t use the WASD keys for movement, but the UIS service works for those keys?
Script:
local ContextAction = game:GetService("ContextActionService")
function sinkInput()
return Enum.ContextActionResult.Sink
-- Sinks the key so that no action is taken.
-- Since this will be the most recent bind to the key, it takes priority over default movement.
end
-- Disables movement.
function disableMovement()
ContextAction:BindAction("DisableMovement", sinkInput, false,
Enum.KeyCode.W,
Enum.KeyCode.A,
Enum.KeyCode.S,
Enum.KeyCode.D
)
end
disableMovement()
sinkInput()