local handle = script.Parent.Handle
local deb = false
function onActivated()
if not deb then
deb = true
handle.pet4:Play()
wait(4)
deb = false
end
end
script.Parent.Activated:connect(onActivated)
I really don't know what is wrong with my script, the script works without the debounce, but the debounce is necessary for this tool i am working on.

2 comments
instead of 'if not deb then' try 'if deb == false then'
this doesn't work i might just redo the script / find another way to add a cooldown