IMPOSIBLE Door Script

Hi I am the worthlesest scripter in the world so please bare with my ignorance.

K so I went trough around 8 or 10 diferent door open script topics, and nothing seems to work for me.

What I have is a door Composed by several object and each have animations, Well imported them from 3DsMax and it animates beutifully in Unity but, I cant get any trigger scripting to work. this is what I did.

1_Imported Door To unity
2_Renamed Animation Clip of door to DoorOpen
3_Renamed FPS controller to Player
3_Created A Box/Aded Triger chek/Aded Script to it
4_Door name is Decont_DoorA

SCRIPT---------------------------------------------------------------------------------------------------------------------

var door : GameObject;

function OnTriggerEnter (collision : Collider)
{
if (collision.gameObject.tag == “Player”)
{
door.animation.Play (“DeconDoor”);
}
}


Its 1:00 AM and this is the second day I have triyed several scripts, But prety shure it aint script problem but something else. Oh and I triyed similar script to control particles on and of but nothing hapens eather.

on wich object did u add this script ?

Shouldn’t you rather use OnCollisionEnter ? I never saw a door as a Trigger, it is more often a collider…

Is your door box collider has “Is Trigger” off ?

I put the script on the Box with trigger

Ok someone helped me.

1-I put object name in tag instead of tag
2-And didint know I had to drag door to the triger ogbject.

THX anyway.