What is a good way to stop a looping animation when moving?

I have a looping attack animation, is there an easy way to stop this animation when my character starts moving? Atm I have to always call my “stop” trigger and it doesnt always work great and feels messy.

This feels like more about your aproach to character controller script.

You can change stop with movement bool and check for when your your character should move. It is not really any different but at least movement would be more meaningful and general use term for state machine.
Or if your speed increases before movement animation you may use that for a condition for changing to locomotion from attack but i imagine that would be bad for overall quality.

Ill try a bool, thanks! So basically a “IsMoving” Bool in the Animator that will exit any node when set to true?

Yeah, if you want state machine to work that way, though I don’t get why prior doesn’t always work. It may be something about your transitions settings.