Detect entity movement

I'm making a datapack with some custom mobs and I want to make it to where when the entity moves the walk animation plays but I've been unable to figure out how to do so.

Continue to help post