How to reset a combo after a certain amount of time?

I am making a sword script, and in it when you press Left or right click, it starts a combo, the combo ends at 3, however im trying to figure out how to make it so if the combo isnt continued in a certain amount of time it resets back to 0, would someone mind explaining how to do that or link something that explains it?

hey @MasterOfUniverse98 ,

i found a video that mabye helps you. You can skip the beginning since you already have the first steps done.