Hold character stuck in Z space?

Alright so i just made a little mistake that i can fix by alot of different ways, but none of my ways arent very simple, so i was just wondering if anyone of you had a better way to solve this in?

I am animating my character for my game in unreal using blender. So i was making a attack cycle, with attack1, attack2, attack3

The problem is i made my character take a step forward in all of my attack animation, so at the end of attack3, he is standing like 3 steps away from the center, witch will make my character in Unreal walk away from my character controller when he attacks, and then he will snap back to center.

Is there an easy way to make him stand in the center even after i have made all the animations?

The problem i see with this is that i got IK Riggs on hands and feet