calling animation on gameobject

i got a bit of a problem here everything works EXCEPT for the animation wont play since i cant make it link the animation to the animation.Play(“open1”);
anyone know how to? the script looks like this and the script is put on a collider a child of Door

using UnityEngine;

using System.Collections;

public class ActivateDoor : MonoBehaviour {

    public Transform door; // select the door in the inspector

    private bool colidingThisDoor = false;

    void Start () {

       // select the parent as the door, as adviced, if it wasn't manually set

       if (door == null) {

         door = transform.parent;



    void OnTriggerEnter (Collider other) {

       colidingThisDoor = true;


    void OnTriggerExit(Collider other) {

       colidingThisDoor = false;


    void Update () {

       if (colidingThisDoor) {

         if (Input.GetKeyDown("e")){

         // Debug.Log ("E was pressed for door "+ +" on collider "+;






thanks alot in advance!

i cant comment on my above post caus of moderation |-( so i would think change to door.animation.Play(“open1”);

in not great with c# but it looks like this script isnt on the door object, but you are calling on the player, not the door?