Help with OnGUI ... multiple boxes showing?

I’ve been trying to display a screen which shows the character’s information, and if you click on a certain button, it moves to the next screen. However, when I click on the button, both boxes end up showing, but if you click again then it goes away.

Here’s my code:

function OnGUI(){

	if(showCharacterInfo == true){
		GUI.Box(Rect(Screen.width-260,Screen.height/2-125,250,250), "Character");
		if(GUI.Button(Rect(Screen.width-93, Screen.height/2+92, 80, 30), "Stats")){
			showCharacterInfo = false;
			showStats = true;


Any explanation for why this happens?

You probably have the same script attached multiple times to the same object, or different objects. There’s probably two identical boxes at first as well but you don’t notice until one of them changes and they look different.