I'd like to implement this short sprint script into my game however it won't work and I can't identify the problem. Your help would be greatly appreciated. :)
local Player = game.Players.LocalPlayer
Player.CharacterAdded:wait()
local Mouse = Player:GetMouse()
local Speed = 33
local Humanoid = Player.Character:WaitForChild("Humanoid")
local OrigSpeed = Humanoid.WalkSpeed
local active = false
Mouse.KeyDown:connect(function(Key)
local Code=Key:byte()
if Key == Enum.KeyCode.LeftShift and active == false then
Humanoid.WalkSpeed = Speed
active = true
elseif Key == Enum.KeyCode.LeftShift and active == true then
Humanoid.WalkSpeed = OrigSpeed
active = false
end
end)
