#i may be smart but how the f do i make a debounce on the click like make a cooldown on the button
15 messages · Page 1 of 1 (latest)
like i need it to wait a certain amount before the player can click the on/off button again
example of making a cooldown
local debounce = false
local part = script.Parent
part.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") and debounce == false then
-- |
-- checks if debounce is false
debounce = true
-- do something
wait(5)
debounce = false
end
end)
yw
omg ty it works :)
u know u can do better
lol
i think i fixed it
lol it still helped me dw xd
** You are now Level 10! **