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

How do you make players not be able to move?

So I have made a script that makes the player not be able to move but don't know where to put it and what type of script to use I am relatively new to coding on roblox. Here's the script that I made.

Player.Humanoid.Walkspeed = 0
Player.Humanoid.Jumpspeed = 0

Tell me if the script is incorrect

4 comments

0

It's WalkSpeed and JumpSpeed

0

Make a Body Velocity inside the player

0

Excuse me it's JumpPower, not JumpSpeed

0

Thanks

1 answer

✓ Accepted answer

First off, JumpSpeed doesn't exist. I think you mean JumpPower

And you would have to put this in a server script as the client cannot edit the humanoid properties.

Something like so: (not tested)

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		local humanoid = character:FindFirstChild('Humanoid')
		if humanoid then
			humanoid.WalkSpeed = 0
			humanoid.JumpPower = 0
		end
	end)
end)

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