Thanks for the feedback, you probably couldn't use the sword attack because the player was standing still. I did it precisely so that the player would need to move to attack, which is not common in other games.
Pulling the joystick in any direction will make the player move and attack with the sword strike.