How to disable player wasd without change walk speed to 0

Hello! I want to make player follow other player but I got problem. When player follow with moveto they can jump and walk to escape. So I wanna know how can I disable player keyboard in server script.

Thank for helping. :grin:

You can disable the players control through a local script by disable controls through the player module.

I made a simple script that will stop the player movement for 5 seconds.

local player = game.Players.LocalPlayer
local Controls = require(game.Players.LocalPlayer.PlayerScripts:WaitForChild("PlayerModule")):GetControls()


function stopMovement(seconds)
	Controls:Disable()
	wait(seconds)
	Controls:Enable()
end

stopMovement(5)

1 Like

is it possible to put it in server script