For my project I created a "priority" variable for animations. I made it so animations like walking only play if the priority is 0, stuff like "kicking" play if its 1.
So when the player presses the button to kick, set the priority to 1.
Add a condition to the walking animation: "priority = 0" and an action to when the kicking animation ends: "set priority to 0"
This way, the walking animation will never play if the kicking animation is playing