Accessing a script from one scene to another using dontdestroyonload.

I am having a bit of a snag when trying to reference a script from my first scene to my second. The actual thing i am trying to do is flip a bool switch once the person leaves the house on scene 2 and say its true to the script on scene one, which has dontdestroyonload in it but it keeps throwing up gameobject not set error anytime anything is referenced to that script.

The reference script looks like this.

using UnityEngine;
using System.Collections;

public class PlayerPosOutdoors : MonoBehaviour {

	public bool BShouse1;

	// Use this for initialization
	void Start () 
	{
		BShouse1 = false;
	}
	
	// Update is called once per frame
	void Update () 
	{
	
	}
	
	void Awake()
	{
		DontDestroyOnLoad(gameObject);
	}
}

and the part from leaving the second scene back into the first looks like this.
using UnityEngine;
using System.Collections;

public class BlacksmithHouse1ToExt : MonoBehaviour {
	private bool canClickTheDoor;
	public GameObject player1;
	
	
	// Use this for initialization
	void Start () 
	{
		
		canClickTheDoor = false;
	}
	
	// Update is called once per frame
	void Update () 
	{
		
	}
	

	
	
	void OnTriggerEnter(Collider thePlayer)
	{
		if(thePlayer.gameObject.tag == "Player")
		{
			canClickTheDoor = true;
			Debug.Log("Can Click The Door");
			
		}
	}
	
	void OnTriggerExit(Collider thePlayer)
	{
		if(thePlayer.gameObject.tag == "Player")
		{
			canClickTheDoor = false;
			
		}
	}
	
	void OnGUI()
	{	
		
		if(canClickTheDoor == true && Input.GetKeyDown(KeyCode.F))
		{
			PlayerPosOutdoors boolDoor = GetComponent<PlayerPosOutdoors>();
			boolDoor.BShouse1 = true;
		
			Application.LoadLevel(0);
		}
	}
	
}

Its saying the error is line 50, or anyline basically that trys to reference that script.
any help if very much appreciated.

well in this case its showing the error for the booldoor.BShouse1

GetComponent only looks for components on the same GameObject.

Try this:

	PlayerPosOutdoors boolDoor = (PlayerPosOutdoors) GameObject.FindObjectOfType(typeof(PlayerPosOutdoors));

http://docs.unity3d.com/ScriptReference/GameObject.GetComponent.html

http://docs.unity3d.com/ScriptReference/Object.FindObjectOfType.html