How do I erase one of the many GUI on my screen?

So Basically I have two colliders which display GUI.

One is on my door/lever, once you reach close enough it displays “Press e to open”.
Once you leave the trigger, it sets drawGUI = false;

Now I have a bigger trigger collider for the entire zone which is for a tutorial ground.
I walk to said zone, the GUI displays.

Now if I walk up to the lever, both of these GUI display properly.

However if I walk out of the lever zone, it erases BOTH GUI that I have, instead of just the one.

How would I erase just the one, as opposed to the other?

Here is the code for my door/lever.

#pragma strict

var theDoor : Transform;
var theLever : Transform;
private var drawGUI = false;
private var doorIsClosed = true;
//var LeverCollider = false;


function Update ()
{
	if (drawGUI == true && Input.GetKeyDown(KeyCode.E))
	{
		changeDoorState();
	}
}

function OnTriggerEnter (theCollider : Collider)
{
	if (theCollider.tag == "Player")
	{
		drawGUI = true;
	      //LeverCollider = true;
	}
		
}

function OnTriggerExit (theCollider : Collider)
{
	if (theCollider.tag == "Player");
	{	
		drawGUI = false;
	//	LeverCollider = false;
	}
}


function OnGUI ()
{
	if (drawGUI == true)
	{
		GUI.Box (Rect (Screen.width*0.5-55, 35, 110, 25), "Press E to Open");
	}
}

function changeDoorState()
{
	if (doorIsClosed == true)
	{
		theLever.animation.CrossFade("Pull");
		theDoor.animation.CrossFade("Open");	
		doorIsClosed = false;
		yield WaitForSeconds (3);
		theDoor.animation.CrossFade("Close");
		doorIsClosed = true;
	}
}

and here is the code for my tutorial zone

#pragma strict

private var drawGUI = false;
var TrainingGroundsLevel = 0;
var GUIBool = false;


function OnTriggerEnter (theCollider : Collider)
{
	if (theCollider.name == "BeginningCollider")
	{
		TrainingGroundsLevel = 100;
		//drawGUI = true;
		GUIBool = true;

	}	

	
	if (theCollider.name == "TrainingGroundsIntroCollider")
	{
		TrainingGroundsLevel = 1;
		//drawGUI = true;
		GUIBool = true;
	}
	
		if (theCollider.name == "TrainingGroundsTreesCollider")
	{
		TrainingGroundsLevel = 2;
		//drawGUI = true;
		GUIBool = true;
		//Debug.Log("Working");
	}
	/*
	if (GUIBool == true)
	{
		drawGUI = true;
		Debug.Log("Working");
	}
	*/
	
}


function OnTriggerExit (theCollider : Collider)
{
	if (theCollider.name == "BeginningCollider");
	{
		//drawGUI = false;
		GUIBool = false;
		TrainingGroundsLevel = 0;
	}
	
	if (theCollider.name == "TrainingGroundsIntroCollider");
	{
		//drawGUI = false;
		GUIBool = false;
		TrainingGroundsLevel = 0;
	}
	
	if (theCollider.name == "TrainingGroundsTreesCollider");
	{
		//drawGUI = false;
		GUIBool = false;
		TrainingGroundsLevel = 0;
	}

}

function OnGUI ()
{


	if (GUIBool == true && TrainingGroundsLevel == 100)
	{
		//drawGUI = true;
		GUI.Box (Rect (0, 50, 250, 250), "MY CONTROLS AND INTRODUCTION TEXT HERE.");
	}

	if (GUIBool == true && TrainingGroundsLevel == 1)
	{	
		//drawGUI = true;
		GUI.Box (Rect (0, 50, 250, 250), "Other training text here");
		GUI.Box (Rect (Screen.width*0.5-105, 10, 210, 25), "Training Grounds - Intro");
	}
	if (GUIBool == true && TrainingGroundsLevel == 2)
	{
		//drawGUI = true;
		GUI.Box (Rect (Screen.width*0.5-105, 10, 210, 25), "Training Grounds - Trees");
	}

}

Hey there,

You don’t “delete” GUI. It gets erased every frame. Your code is just drawing it again every frame. If you want to stop drawing it just stop calling GUI.(whatever). You just need to add more checks to see when you want to draw items.

Regards,

You have made an error in the OnTriggerExit method of your tutorial zone code which causes the GUI to turn off whenever you exit any trigger. To fix this, delete the semicolon at the end of the if statements on lines 46, 53, and 60.