1 | game.Workspace.ControlStationForTruck.Button.ClickDetector.MaxActivationDistance = 0 |
2 | wait( 10 ) |
3 | game.Workspace.ControlStationForTruck.Button.ClickDetector.MaxActivationDistance = 32 |
Is there a better way to write that?
you can just add a wait and a debounce
01 | local debounce = true |
02 | script.Parent.MouseButton 1 Click:Connect( function () |
03 |
04 | if debounce then |
05 | debounce = false |
06 | wait( 10 ) |
07 | debounce = true |
08 | end |
09 |
10 | end ) |