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

How Do I disable every single action in a player?

I want to disable every single action except the leave button esc and reset but how do i do this is there a service? By this I mean no movement only for the character

1 answer

Explanation

If you want to disable character movement, your best bet is to can make changes on the server to the player's character. Since changes on the server will replicate, you can effectively disable movement for as long as you wish by altering the WalkSpeed and JumpPower Properties of the player's Character Model Humanoid. The reason this is best done on the server is because players can undo the Humanoid adjustments on the Client, or they will not move on the Client but appear to move on the Server.

Example Server Script Code

player.Character:WaitForChild("Humanoid").WalkSpeed = 0
player.Character:WaitForChild("Humanoid").JumpPower = 0

when you want to return these values to the default simply change them to

player.Character:WaitForChild("Humanoid").WalkSpeed = 16
player.Character:WaitForChild("Humanoid").JumpPower = 50

Although not recommended, you can also Anchor the player's root part to prevent movement on either the Client or the Server:

player.Character:WaitForChild("HumanoidRootPart").Anchored = true

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