I am trying to make it so that the player cannot use W,A,S,D or jump at all for a short period of time. I have looked in the character but can’t find any script of sorts that allows me to disable this. Can someone please tell me how i do this?
A simple way would to be just anchor a part of the player and the deanchor
You can set their WalkSpeed and JumpHeight / JumpPower to 0, they’re members of the Humanoid within the player’s character
Links for reference:
Oh thanks I didn’t know that. Let me try
Oh thanks this will work since I need an animation to play at the same time.
local players = game:GetService("Players") local player = players.LocalPlayer local playerScripts = player:WaitForChild("PlayerScripts") local playerModule = playerScripts:WaitForChild("PlayerModule") local controlModule = require(playerModule) local playerControls = controlModule:GetControls() playerControls:Disable() task.wait(10) playerControls:Enable()
This is the official way of achieving this (disabling the player’s movement controls).