Stop a script in the middle of it running?

I’m currently making a combat orientated game and was wondering how I would make a move cancel when you get hit. Any suggestions?

Please be more specific. What do you meant by your move? Is it an animation? Or something else?

Add a if statement like

if(YourFunctionWhenPlayerIsHit)
then add your code which cancels animation and instead adds the get hit animation, and whatever you want…

Like a combat move, heavy punch. etc

1 Like

Okay, your response gave me a idea thanks.

1 Like

No problem mate, I am always looking to help people :slight_smile: