#Cooldown

1 messages · Page 1 of 1 (latest)

lunar igloo
#

I am using a free script (cooldown) and inserting it into my tool so it has a small cooldown before being used again. But the problem is, neither if i do an actual script or insert one in the tool, the cooldown will never work and have that 5 second (ish) delay. Can anyone help me out, please?

azure pagoda
#

can you show the script

#

?

main jackal
#

yes show the script

daring pewter
#

did you try asking the person who wrote the script?

lunar igloo
#

local tool = script.Parent
local COOLDOWN = 300
local canUse = true

tool.Activated:Connect(function()
if not canUse then
print("Cooldown active, wait please.")
return
end

canUse = false
tool.Enabled = false  -- disable tool use

print("Tool used! Cooldown started.")

-- Put your punch logic here if you want

task.delay(COOLDOWN, function()
    canUse = true
    tool.Enabled = true  -- re-enable tool after cooldown
    print("Cooldown ended, tool ready.")
end)

end)