Create a variable "canwalk" ; 0 = the player can walk and 1 = the player cannot walk.
Then try this:
If [your walk button] is pressed
and if variable canwalk = 0
----> then the character walks.
If [your attack button] is pressed
---> the character attacks
plays animation "attack"
put the variable canwalk to 1
When the animation 'attack" is finished, put the variable canwalk to 0.