Attack Animation Help For A Platform Game

Hi, i really need help trying to get animations going for not just attack but also walking, more specifically how to structure my code in a way that lets my animations work, here are screenshots on how i currently orchrestrated the blocks:

Walk Attempt:

Attack Attempt: