Looking for a timeout script

I’ve been searching for hours for this.
I can’t find any results. Is there a way to make a timeout on a certain button before you can click it again and fire a function? If so, please share results. Thanks.

1 Like

Just a side note, but do please search the Forum more before posting (We can’t exactly give you scripts that easily)

You could just make a Debounce, which is basically a cooldown that’ll prevent it from firing multiple times (You can adjust a couple of changes to it however, but here’s a simple example):

--Example A: This Script is in a Part, which also holds a ClickDetector Object
local Part = script.Parent
local Debounce = false
local ClickDetector = Part.ClickDetector
local Cooldown = 60

local function Clicked()
    if Debounce == false then
        Debounce = true
        --Do your stuff here as usual
        wait(Cooldown)
        Debounce = false
    end
end

ClickDetector.MouseClick:Connect(Clicked)

Works, thank you for that example.