Hey everybody, i want ask your help for a little problem i have, i was setting up an animation and my Unity Enginge doesnt recognized SetTrigger, can any1 help me out here plz??

Thanks in advance
Regards!
Hey everybody, i want ask your help for a little problem i have, i was setting up an animation and my Unity Enginge doesnt recognized SetTrigger, can any1 help me out here plz??

Thanks in advance
Regards!
The problem is in your declaration of “animator”. It’s not shown above, but we can tell from the error message that it is an Animation, not an Animator.
thanks!!! i ll try that
Hey, i tried but didnt work, animator is a function i created,

i tried Animation.Settrigger and got an error anyway ![]()

Cant understand why i doesnt work, plz help!
To be blunt you’re trying to use a language without understanding how to use the language.
No. It’s an instance of a class.
There are two problems here. One, like @JoeStrout mentioned it’s the wrong class. Two, you’re trying to call the method of the class directly when you should be calling it through the instance.
You need to change this:
private Animation animator;
To this:
private Animator animator;
Then you need to change this:
Animation.SetTrigger
To this:
animator.SetTrigger
cool thank u very much
it work thank you very much