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

How do I make a script that increases the players walkspeed every second?

Asked by 6 years ago
Edited by OldPalHappy 6 years ago

I'm trying to make a script that increases the players walkspeed by 1 every second by using a numbervalue but it isn't working, here's the script:

game.Players.PlayerAdded:connect(function(player)
    player.CharacterAdded:connect(function(character)
    character.Humanoid.WalkSpeed = script.Value.Value
    wait(1)
    script.Value.Value + 1
    end)
end)

1 answer

Log in to vote
0
Answered by 6 years ago

No need for number value

game.Players.PlayerAdded:connect(function(player)
local character = player.Character or player.CharacterAdded:wait()
local Humanoid = character:WaitForChild("Humanoid")
while wait(1) do
Humanoid.WalkSpeed = Humanoid.WalkSpeed + 1
end
end)
Ad

Answer this question