gui.button taking 2 clicks to make a gui go away

I had some good success with the help i got from here before and was looking to see if someone can help me with my latest snag. I am trying to do a quest type of dialogue, where after you hit accept the GUI and button all disappear. But for some reason after clicking accept once it the gui box kinda greys out alittle and doesnt disappear until you click accept a second time. Heres what I got so far.

using UnityEngine;
using System.Collections;

public class QuestNpc : MonoBehaviour {

	public bool interactWithNpc = false;
	
	public bool hasInteracted = false;
	
	public bool hasAcceptedQuest = false;
	
	public bool quest1Completed = false;
	
	public int applesCollected = 0;
	
	
	// Use this for initialization
	void Start ()
	{
		interactWithNpc = false;
	}
	
	// Update is called once per frame
	void Update () 
	{
		if(Input.GetButtonDown("Interact") && interactWithNpc == true)
		{	
			hasInteracted = true;
		}
	}
	
	
	void OnTriggerEnter(Collider col)
	{
		if(col.gameObject.name == "Player")
		{
			
			interactWithNpc = true;
			
			Debug.Log("Entering");
		}
	}
	
	
	void OnTriggerExit(Collider col)
	{
		if(col.gameObject.name == "Player")
		{
			hasInteracted = false;
			interactWithNpc = false;
			Debug.Log("Exiting");
		}
		
	}
	
	void OnGUI()
	{
		if(interactWithNpc == true && hasAcceptedQuest == false)
		{ 
			
			GUI.Label (new Rect(Screen.width / 2, Screen.height / 1.1f , 200, 20), "Press 'E' to Enter/Exit dialogue mode");
			
			if(hasInteracted == true && interactWithNpc == true && hasAcceptedQuest == false)
			{
				GUI.Label(new Rect(100, 100, 100, 100), "This is a test for my first quest");			
				GUI.Box(new Rect(50,50,500,500),"This is the beginning of your journey");
				GUI.Label(new Rect(Screen.width / 3, Screen.height / 2.2f, 200, 200), "Could you do a old man a favor and get me some apples 5 of them should do");
				
				
				if(GUI.Button(new Rect(50, 80, 80, 20), "Accept"))
				{
					interactWithNpc = !interactWithNpc;
					
					hasInteracted = false;
					
					hasAcceptedQuest = true;
					
					Debug.Log ("Quest Accepted");
					
				}
			}

				
				if(hasAcceptedQuest == true)
				{
					
					
					Debug.Log ("hasInteracted is false");
				}			
			
			
			
			
			
		}
		

	
	}
	
	
}

Hard to tell as I’m not well up on OnGUI, came too late to Unity so I’m sticking with the new UI but…

what happens if you move

interactWithNpc = !interactWithNpc;
                     
hasInteracted = false;

into

if(hasAcceptedQuest == true)
{

}

I’m editing in my head, which normally goes badly, but let’s see what results you get.

EDIT

Difficult to help without being able to recreate the setup can you post the scene or is too big?

You could export the scene and zip it up and rename to txt and attach, or use dropbox or google drive to upload it and I’ll see if I can fix without having to “create” it all in my head :¬)

May not be practical if the scene is huge.

EDIT 2

Or if you don’t want to do that just post enough so I can recreate your OnGUI stuff to debug it.

I found out what it was and now i feel like a complete idiot, sorry for wasting all of your time, i apparently had 2 of the scripts attached to the quest giver…lol at my expense,
thanks all for trying to help and mods feel free to delete this lol.