Without seeing what you've done or how you've set it up, it's hard to give advice.
In general for 8 direction animations, it is usually best practice to set the animation based on the actual change in position of the sprite as a condition, rather than user inputs.