Tool Countdown?

How would I make a tool have a countdown before use, so it’d have a gui counting down and the tool would be disabled till the end of the countdown.

Debounce.
If they try to equip it, and the debounce is still true, make them unequip it (I believe it is putting it straight into their backpack)

For the timer, just do a normal for i = seconds, 0, -1.

You can always do a tick() based debounce:


local debounce = 0
function useTool()
local t = tick()
if debounce > t then
return
end

debounce = t + 1.337 -- this will disable the tool for approx. 1.337 seconds

-- tool code goes here
end


2 Likes