stamina breaking when i let go of shift?
Asked by
5 years ago Edited 5 years ago
when ever i click shift everything goes fine, but when i let go of shift i want the stamina to regen, and i want to be able to run at anytime as long as the stamina is above 0, but when i let go, i cant run anymore, i know i am doing something wrong.
11 | local plr = game.Players.LocalPlayer |
12 | local char = plr.Character |
13 | local hum = char.Humanoid |
17 | uis = game:GetService( "UserInputService" ) |
25 | uis.InputBegan:connect( function (input) |
30 | if input.KeyCode = = Enum.KeyCode.LeftShift then |
32 | hum.WalkSpeed = sprtspd |
37 | hum.WalkSpeed = regspd |
38 | elseif letgo = = true then |
39 | hum.WalkSpeed = regspd |
50 | uis.InputEnded:connect( function (input) |
53 | if input.KeyCode = = Enum.KeyCode.LeftShift then |
59 | if maxstam = = 100 then |