I am trying to make a shift to sprint script, I put a localscript in the starter pack that on key shift down walk speed should be 25 while key shift up walkspeed should be 16.
LocalScript:
local plr = game.PLayer.LocalPlayer
local uis = game:GetService("UserInputService")
local character = plr.Character or plr.CharacterAdded:Wait()
local humanoid = character.Humanoid or character:WaitForChild("Humanoid")
local shift = Enum.KeyCode.LeftShift
local Isshiftdown = uis:IskeyDown(shift)
uis.InputBegan:Connect(function(Input, gameProcessedEvent)
if Isshiftdown then
humanoid.Walkspeed = 25
else
humanoid.Walkspeed = 16
end
end)

1 comment
Sorry, I am still a beginner