Why Isn't my Animation Recognized?

Hai! So I have a script that calls an animation under a condition. It will play every other animation but this one. Here’s the error:

The animation state Fichen_Hit could not be played because it couldn't be found!
Please attach an animation clip with the name 'Fichen_Hit' or call this function only for existing animations.
UnityEngine.Animation:Play(String)

Here’s the line it’s referring to:

transform.Find("Fichen").animation.Play("Fichen_Hit");

and here’s proof I added the animation to the component:

10367-answers4.png

But why would it still not work if I have everyone set up right just like my other animations?

I’m not sure but I guess you either finding your object wrong, or you are not accessing component right, try this way:

C#:

GameObject.Find("Fichen").GetComponent<Animation>().Play("Fichen_Hit");

JS:

GameObject.Find("Fichen").GetComponent(Animation).Play("Fichen_Hit");