UIS.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then mouseDetection:FireServer() wait(3) end end)
Personally, I'd use boolean for delays.
local UIS = game:GetService("UserInputService") local Delayed = false local DelayTime = 3 UIS.InputBegan:Connect(function(input, GPE) if not Delayed then -- if delayed is false -- Code goes here else -- If delayed is true wait(DelayTime) Delayed = false end end)
(Note: This script wasn't tested)