Script not responding to public variable change

So, I have a script which needs access to a variable from an another script. Accessing seems to be functional, however, Changing the variable state does not seem to affect the other script.
Under this, is Script 1, initially containing the variable.

public class MMenuElements : MonoBehaviour
{

public bool ElementButton = false;

void OnMouseDown()
{
	ElementButton = true;
	Debug.Log("Button pressed");
}

void Update ()
{
	if(ElementButton == true) 
	{
		Debug.Log("eButtton is true");
	}
}

}

Quite simple. Next, there’s the Script 2, which needs access to Script 1.

public class MMCam : MonoBehaviour
{

private MMenuElements eButton;

void Update () 
{
	if(eButton.ElementButton == true)
	{
		gameObject.SetActive(false);
	}
}

}

So, is there anyone who might have a clue at what’s causing the problem?

So you have a private variable for script 1 in script 2, but I don’t see it being assigned anywhere. You need to either make it public and assign it via the inspector, or assign it in your Start() method using something like GameObject.Find() or GameObject.FindGameObjectWithTag().