#im trying to make it so the brick can only be spawned once every 3 seconds

9 messages · Page 1 of 1 (latest)

slate perch
#

what the title says i need the brick to be able to get regenerated every 3 seconds to avoid autoclickers lagging out the game

stable flame
#

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?

oblique nimbus
#

why not have task.delay instead and uselua if not canclick then --does nothing else task.delay(3,function() canClick = false end) end

stable flame
oblique nimbus
#

lol because if not makes it false