I am trying to use trigger to destroy a door object when the box object collides with trigger. But the code is not working, I have trigger in place and box can pass through it but doesn’t destroys the door. I have placed this code in trigger object.
function onTriggerEnter (other : Collider){
if (other.tag == "box"){
Destroy (gameObject.Find("door"));
}
}