How to make a character not stop punching?

Its hard to explain but i want to make a “combo” for my punches. Basically when you punch the characters leans foward to attack then punches and comes back to its previous position but i want to make it so after a punch if you press attack again it won’t go back but attack again and only go back when you didn’t punch for some time. I found a function called tick() which could help with that but idk how to script that.

Well, you can use while (true) do loops.
So, lets say something like while UserInputService:IsKeyDown(Enum.KeyCode.P) do

i want the player to click insted of holding the mouse so i don’t think that would work

Okay i found a solution:
after the attacks cooldown ends i wait 0.2 sec and then check if is attacking