In the future, please paste the code instead of a screenshot of the code. It is really difficult to help when we have to try and read stuff from a screenshot, and impossible to copy-and-paste code back when we need to. See this post on how to format the code in posts.
At first glance the code looks fine. Have you checked that your animations are tagged with “Attack” and that it is exactly the same, i.e. same spelling, same case, etc?