Use a global variable trigger.
When you are not attacking set it to a number and when you are attacking set it to a different number.
On Key Press Left: Set animation player to "walk"
Movement=1
On Key Press Attack: Set Movement=0
On Movement=0: Set animation "Attack
............................. Wait X seconds
............................. Set Movement=1
That way your player will not move when attacking.