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

How to make someone walkspeed stay at 35 even after they die?

Asked by 7 years ago
game.Players.PlayerAdded:connect(function(plr)
repeat wait() until plr.Character ~= nil
local char=plr.Character
local hum=char.Humanoid
hum.WalkSpeed=35
end)
1
I believe a more simple approach would be to create a "StarterHumanoid" in StarterPlayer and set the WalkSpeed there. (http://devforum.roblox.com/t/startercharacter-startercharacterscripts-starterhumanoid/23761) jakedies 315 — 7y

1 answer

Log in to vote
1
Answered by 7 years ago

You can use the CharacterAdded event to make some code run every time something spawns.

This code is straight from the roblox wiki:

game.Players.PlayerAdded:connect(function(player)
    player.CharacterAdded:connect(function(character)
        character.Humanoid.WalkSpeed = 35
    end)
end)
Ad

Answer this question