Add gravity Jump function when Tool clicked?

Hi everyone I’m currently working on a Tool Abilty System…
And I just need a function that if equip the Tool and activate the function I should automatically jump 2 times higher than the normal jump and the tool should have a cool down of 10 Sec.
Thx for any Response

1 Like

Use the Tool.Activated event signal to know when the tool has been triggered. Tools that are held are parented to the player’s character model so it’s easy to locate their Humanoid object to modify jump height.

To get the cooldown you want to use os.time() or tick() to figure out the current time. Every time Tool.Activated is triggered subtract the current time with the last successful use of the tool. If this number is greater than 10 then the cooldown window has passed.

—This was written on a phone don’t assume it is functional 
local savedTime = 0
   if os.time() - savedTime >= 10 then
      savedTime = os.time()
      —Other code here

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.