# How to make a temporary collision?

I have a key and door system working, the character(ball) picks up the key and when it is within the collider it sets the text("press E to open") on the screen to active so that they can open the door. This only needs to be there while the door is closed. How Would I fix this. Thank you so much in advance.

    //GameObject E is the canvas text to instruct the player to press E to open the door.
public GameObject E;
//Door is the door itself, I assigned this manually because the door consists of the doorframe and door.
public GameObject Door;
private bool Unlock;
// Use this for initialization
void Start ()
{
E.SetActive(false);
Unlock = false;
}

// Update is called once per frame
void Update ()
{
if (Unlock)
{
if (Input.GetKeyDown("e"))
{
Door.GetComponent<Animation>().Play();
E.SetActive(false);
CodeManager.GotKey = false;
}
}
}
void OnTriggerEnter(Collider other)
{
if (CodeManager.GotKey)
{
if(other.gameObject.CompareTag("Player"))
{
E.SetActive(true);
Unlock = true;
}
}
}


if(ohter.gameObject.CompareTag("Player") && Door.isClosed)