Parallaxox

Debounce

May 14th, 2020
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.28 KB | None | 0 0
  1. --https://www.youtube.com/watch?v=ZmVM1CUMRrc
  2. local value = 0
  3. local debounce = false
  4. script.Parent.Mouse1ButtonClick:Connect(function(click)
  5. if debounce == false then
  6. value = value + 1
  7. script.Parent.Text = "I've been clicked " .. value .. " times"
  8. wait(5)
  9. debounce = false
  10. end)
Add Comment
Please, Sign In to add comment