ANIMATION TRIGGER DOESN'T PLAY

Hi i try to play an animation trigger ( it’s just a door that moving up ) but when i press play i have no error information in my console and in my game the collider doesn’t work my FPSController goes through the door !
this is the script i used

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class DoorOpen : MonoBehaviour {

Animation Animation; 

void Start()
{
	Animation = GetComponent<Animation>(); 
}

void OnTriggerEnter(Collider other)
{
	if (GetComponent<Collider>().name == "FPSController")
	{
		Animation.Play("OpenDoor");

   	}
   }
}

The reference to the object you collided with (in your case “FPSController”) is held in the “other” variable and this is the reference you need. But what you are trying to do is to get the reference to the collider which is attached to the gameobject to which your script is also attached, which is pointless. The problem lies here:

     if (GetComponent<Collider>().name == "FPSController")

just change the above line to this:

     if (other.name == "FPSController")