How To Make NPCs have a combo system

Basically how would I make it where a NPC would have a combo. Like after one punch it will play the next animation and the next animation, etc. I tried this but it doesn’t work It only plays one animation and I get not outputs.

delay(.5,function() AttackEnabled = true end)
		
				if Anim and number == 1 then 
					Anim:Play()
					number = 2 
				end
				if Anim1 and number == 2 then
					Anim1:Play()
					number = 1
				end
			DamageTag(TargetHum.Parent,5)

After you play the animation, put Anim.Stopped:Wait() so it waits for the animation to finish playing. The same thing for the other animation except it’s Anim1.Stopped:Wait().