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

dose any one know how to make a sprint script ??

Asked by 10 years ago

i used to have one that work but the updates killed it please tell me were to get a new one or help me fix the old one

2 answers

Log in to vote
0
Answered by 10 years ago

If you had it so when you pressed a key, or got any input for that matter. Just up the player speed.

Ad
Log in to vote
0
Answered by 10 years ago
Sprint_Speed = 30 --[[The default walkspeed is 16 so]]--
                  --[[the Sprint_Speed number should]]--
                  --[[be higher than 16             ]]--

MyMouse = game.Players.localPlayer:GetMouse()
Player = game.Players.localPlayer

MyMouse.KeyDown:connect(function(key)
    if (key:byte() == 48) then
    local human = Player.Character:FindFirstChild("Humanoid")
    human.WalkSpeed = Sprint_Speed
    end
end)

MyMouse.KeyUp:connect(function(key)
    if (key:byte() == 48) then
    local human = Player.Character:FindFirstChild("Humanoid")
    human.WalkSpeed = 16
    end
end)

Left shift to sprint. Put this in a local script in the StarterPack

Answer this question