How can I know how long has it been since an action happened in a script

So I did found something on yt that I can say it works.

Here is the code:

if lastPunch[plr] then

		local passedTime = os.clock() - lastPunch[plr]

		if passedTime >= 2 then
			count = 1
			char:SetAttribute("Combo", count)
		end

	end

	lastPunch[plr] = os.clock()
end

I tried something similar but if I click more times the second variable will reset more times in a row when I need it to reset just once.

can you just show us your code?

rn is the one that I just posted