Problem with EnterTrigger

HI Guys tonigt i have a problem with a EnterTrigger script:

function OnTriggerEnter(other: Collider){
  if (other.tag == "Player"){ // remember to tag the player as "Player"
    animation.Play("Animacja");
  }
}

And i take a picture:

And i make a box collider with Is Trigger but when i walk to it animation does’nt play.

What i can do to fix it?

With this code and hierarchy, the trigger will be animated when the player enters it! Is this exactly what you want? Or should the player play the animation? If so, attach this script to the player instead - but remember to change the tag accordingly. Supposing that the trigger is tagged as “AnimTrigger”, the code could be:

function OnTriggerEnter(other: Collider){
  if (other.tag == "AnimTrigger"){ // verify trigger tag
    animation.Play("Animacja");
  }
}

NOTE: Remember to register the trigger tag before using it!