my attack animation will not work

i am currently trying to get my attack animation to work, but it will not work. i have tried everything but i will not work. this is my script

if (Input.GetKeyDown(KeyCode.E)) {
animation.Play("Attack");
}

i dont see anything wrong with it, and could someone edit this for me?

  • Is that script enabled ?
  • Does that GameObject have an animation component ? If not, the previous the previous statement is false too.
  • Does the animation component have an “Attack” animation ?
  • Are you sure there isn’t an other animation called later, overriding this one ?
  • Is timeScale > 0 ?

All I see so far.