So, I have a script that'll play a sound and popup a dialogue gui on click, and it disappears after 3 seconds. But, sometimes people will spam click the area and the sound spams. How do you temporarily disable the click detector for 8 seconds after it is clicked and then it re-enables. This is what I have
Brick = script.Parent
Sound = Brick.Sound
function onClicked()
wait(1.5)
Sound:Play()
wait(1.5)
Sound:Stop()
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)

1 comment
Okay, thanks