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 11 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 11 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 11 years ago
01Sprint_Speed = 30 --[[The default walkspeed is 16 so]]--
02                  --[[the Sprint_Speed number should]]--
03                  --[[be higher than 16             ]]--
04 
05MyMouse = game.Players.localPlayer:GetMouse()
06Player = game.Players.localPlayer
07 
08MyMouse.KeyDown:connect(function(key)
09    if (key:byte() == 48) then
10    local human = Player.Character:FindFirstChild("Humanoid")
11    human.WalkSpeed = Sprint_Speed
12    end
13end)
14 
15MyMouse.KeyUp:connect(function(key)
16    if (key:byte() == 48) then
17    local human = Player.Character:FindFirstChild("Humanoid")
18    human.WalkSpeed = 16
19    end
20end)

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

Answer this question