Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

how do i stop a player from moving?

Asked by
Jumbuu 110
8 years ago

this isnt a request, i just wanna know the properties which needs to get tcked off

1
Set Walkspeed to 0, set JumpPower to 0, and set AutoRotate to false. M39a9am3R 3210 — 8y

2 answers

Log in to vote
2
Answered by 8 years ago

You would do it like this:

1game.Players.Player1.Character.Humanoid.WalkSpeed = 0
2game.Players. Player1.Character. Humanoid.JumpPower = 0
3 
4game.Players. Player1.Character. Humanoid.AutoRotate
5= false

From this code, the properties you are looking for are WalkSpeed, AutoRotate, and JumpPower.

Ad
Log in to vote
1
Answered by 8 years ago

I would disable the players ControlScript.

1local Players = game:getService("Players")
2local Player = Players.LocalPlayer
3local PlayerScripts = Player:WaitForChild("PlayerScripts")
4local ControlScript = PlayerScripts:WaitForChild("ControlScript")
5ControlScript.Disabled = true
6--If you want to turn it off, just do
7ControlScript.Disabled = false

Answer this question