#How do I make double sprint?
1 messages · Page 1 of 1 (latest)
** You are now Level 1! **
RunSpeed = 0
use UserInputService.InputBegan(Input, GP)
if GP then return end
if Input.KeyCode == Enum.Keycode.LShift then
RunSpeed += 1
if RunSpeed > 2 then
RunSpeed = 0
end
end
end
I type in discord so idk if I typed everything correctly
lemme do it in roblox studio brb
local UIS = game:GetService("UserInputService")
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local SprintState = 0
local Speed = {
[0] = 8,
[1] = 12,
[2] = 16,
}
local function IncreaseSprint()
SprintState += 1
if SprintState > 2 then
SprintState = 0
end
end
UIS.InputBegan:Connect(function(Input, GP)
if GP then return end
if Input.KeyCode == Enum.KeyCode.LeftShift then
IncreaseSprint()
Humanoid.WalkSpeed = Speed[SprintState]
end
end)```
@plain birch I made this script. You can customiza the speed by changing the speed table
like [0] = 12 -- faster
or [2] = 64 -- very fast lol
you can also hook this up with tweenservice to change the fov to make it seem more fast
Tysm bro 😭
I was done with making the characters kits and got so confused on how to do the second sprint. Genuinuely tysm you're a lifesaver
Yeah I will TYSM AGAINNN