#im trying to make it so the brick can only be spawned once every 3 seconds
9 messages · Page 1 of 1 (latest)
what
then make a cooldown for it
this way
local canClick = true
function onClicked()
if canClick then
canClick = false
delay(3, function()
canClick = true
end)
...
end
end
also, you're forgetting to put local before the variables, no?
why not have task.delay instead and uselua if not canclick then --does nothing else task.delay(3,function() canClick = false end) end
why the if not canClick then if it does nothing? and yeah, I accidently forgot to put the cooldown inside the condition
lol because if not makes it false