luau como fazer debounce

local debounce = 2 -- in seconds
local previousTime = os.clock()

while true do
	task.wait(0.41)
    if os.clock() - previousTime >= debounce then
		previousTime = os.clock()
	end
end

--[[
use os.clock() for the client and workspace:GetServerTimeNow() for the server
]]
tomsterBG