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

Why is this basic code not working, trying to make walkspeed 0?

Asked by
Zoltra 4
4 years ago
game.Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function(char)
        local humanoid = char:WaitForChild("Humanoid")
        humanoid.WalkSpeed = 0
    end)

end)

How does something as simple as this not work??? Am I missing something

0
What's the error? D4_rrk 89 — 4y
0
what's not working? you're still able to move? zadobyte 692 — 4y
0
Add a wait(3) or wait(2) after “player.CharacterAdded:Connect(function()” for the character to load in. This isn’t the most efficient. Geobloxia 251 — 4y
0
You could try to use “CharacterAdded:Wait()” Geobloxia 251 — 4y
View all comments (2 more)
0
There's no error. Yh I tried wait(3), that doesn't work. Neither does CharacterAdded:Wait(). I don't get why it's not working? Zoltra 4 — 4y
0
Where have you put the script, I highly recommend putting scripts like these inside either Workspace or ServerScriptService since scripts won't work if you put them in wrong places. D4_rrk 89 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

There is nothing wrong with it, did you put it in a server script in serverscriptservice?

Also 0 means you can't move if you didn't know.

0
0 iq me put it in serverstorage and thought it was serverscriptservice LOL Zoltra 4 — 4y
Ad

Answer this question