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

How do you make players not be able to move?

Asked by 5 years ago

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

0
It's WalkSpeed and JumpSpeed EatableDragonkight 3 — 5y
0
Make a Body Velocity inside the player NinjaXDpro 22 — 5y
0
Excuse me it's JumpPower, not JumpSpeed EatableDragonkight 3 — 5y
0
Thanks HiHowAreYah5 19 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

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)
Ad

Answer this question