I have been trying on and on to getting a clickdetector to work once before a timer stops and is clickable again. I tried for a really long time yesterday until finally I am getting help here. Anyways heres the script:
clicker = script.Parent
local debounce = true
clicker.ClickDetector.MouseClick:Connect(function(player)
if debounce == true then
debounce = false
wait(2)
local models = game.Lighting.Models:GetChildren()
local randomModel = models[math.random(1,#models)]
local modelClone = randomModel:Clone()
modelClone.Parent = game.Workspace
wait(20)
debounce = true
end)

2 comments
Are you using filtering enabled and are you using remote events? Click detectors won't work on filtering enabled without a remote event.
can you help me with that?