Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I make a limited click detector?

game.Workspace.ControlStationForTruck.Button.ClickDetector.MaxActivationDistance = 0
wait(10)
game.Workspace.ControlStationForTruck.Button.ClickDetector.MaxActivationDistance = 32

Is there a better way to write that?

1 answer

✓ Accepted answer

you can just add a wait and a debounce

local debounce = true
script.Parent.MouseButton1Click:Connect(function()

	if debounce then
		debounce = false
		wait(10)
		debounce = true
	end

end)

2 comments

0

Thanks!

0

I'm accepting your answer because I'm not letting this kid just get an answer and not accepting it.

This discussion is preserved as it was. New answers, comments, and votes are closed.