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

How can you change player walkspeed?

Asked by 9 years ago
game.Players.PlayerAdded:connect(function(plr)
    plr.CharacterAdded:connect(function(char)
        repeat wait() until char.Humanoid --Wait for the humanoid.
        char.Humanoid.Died:connect(function(OMG)
            char.Humanoid.WalkSpeed = 0
        end)
    end)
end)

I need the character to die or come in the server to change their walkspeed to 0 what am I doing wrong?

0
It's kind of a prerequesite that you *have* a character to change its WalkSpeed. What exactly are you trying to do? adark 5487 — 9y
0
You're assuming that the Humanoid exists while trying to check if it exists, so you need to do 'char:FindFirstChild("Humanoid")', or 'char:WaitForChild("Humanoid")', which would probably be better, Other than that your code looks fine. Perci1 4988 — 9y

Answer this question