|
| 25 Aug 2014 07:27 AM |
ik you can use the Jumping event in Humanoid, but it fires multiple times per jump
I was wondering if there was a better way so that the event would only fire once per jump
heres the function if it helps
player.Character.Humanoid.Jumping:connect(function() if debounce == false then debounce = true if stamina >25 then repeat if stamina - 3 >=0 then stamina = stamina - 3 StaminaCheck() wait(1) end until player.Character.Humanoid.Jump == false or stamina-3<0 RegenStamina() end wait(1) debounce = false end end)
|
|
|
| Report Abuse |
|
|
| 25 Aug 2014 07:39 AM |
just use Humanoid.Changed:connect(function(change)
if change == "Jump" then -- or whatever the property is called
|
|
|
| Report Abuse |
|