Reverse melee attack on hit

I want to work on a melee system, where if you happen to hit an object or a character - the hit registers internally and damage is calculated and etc… but also stop the attack animation and ultimately reverse the animation back to a standing position (or whatever the idle animation was).

Now sure, I’m gonna need to base the hit detection on overlapping objects with the sword, which is something that was previously discussed, but I am also going to need to calculate whether and how to reverse the animation once a hit is registered.

I am no expert when it comes to animation, therefore I’d like to ask how one would approach such situation.

Thanks in advance, .