I'm trying to figure out how to make a timer after clicking a part so people don't get too much stats on the leaderboard.
In the function that fires once the part is hit, just use the wait function, i.e
local clickdetector = ... --your click detector local part = ... -- your part clickdetector.MouseClick:Connect(function() -- do what you want with your part here wait(x) -- x should be how long the timer will be, to explain it further, if you set it 2, the function wont fire again until 2 seconds pass end)
Use a debounce with the ClickDetector's MouseClick
event.
local clickDetector = script.Parent local debounce = true local debounceTime = 2.5 --Replace with whatever number you want clickDetector.MouseClick:Connect(function() if debounce == true then debounce = false delay(debounceTime, function() debounce = true end) --stuff end end)