How would i implement cancelling in my fighting game?

I’m fairly new to scripting and i really don’t have any idea how i should implement a cancel system into my fighting game. I’ve looked and looked everywhere for something i could use but i couldn’t find anything so this is pretty much gonna be my last attempt at getting a possible answer. I’ve tried looking into coroutines, but it doesn’t seem to flow well with my code. What strategy should i use to approach this game feature?

What do you mean by canceling? Do you mean if you hit a attacker while they are mid attack, it cancels, or do you mean the player is able to cancel thier own attack?