This current script makes it so when you HOLD down the shift key you sprint, however I'd like to make it so when you press the key you can sprint but you don't need to hold the key, and then once you press the key again, you stop sprinting? How would I do this? Your help would be greatly appreciated! :)
wait()local Player=game.Players.LocalPlayer local Mouse = Player:GetMouse() local Speed = 33 local Humanoid = Player.Character:WaitForChild("Humanoid") local OrigSpeed = Humanoid.WalkSpeed
Mouse.KeyDown:connect(function(Key)local Code=Key:byte()if(Code==48)then Humanoid.WalkSpeed = Speed end end) Mouse.KeyUp:connect(function(Key)local Code=Key:byte()if(Code==48)then Humanoid.WalkSpeed = OrigSpeed end end)
