You also have to look at your logic, you logic most likely says if the player presses right, play the run animation. YOu need another sub condition that check if they are hitting left/right and hitting attack to handle that scenario correctly. You need to think about what actions your character could have happen at the same time, then either create conditions that match those to play the correct animation or use event to keep certain conditions from happening at the same time. Using variables to track state can help this a lot. You can have a variable for running, and one for attacking. In your attacking check you look to see if the character is running and if so, cancel the run, or do whatever you need in that situation.