check if the bool is true from other script c#

hi . i want to make a popup window when the character die with UI . i made a pause bool in character script and it works . in canvas script i want to say when pause is true ( or time.deltatime = 0 ) show the canvas . i wrote this in canvas script but it doesn’t work .

void Start () 
	{
		gameObject.SetActive (false);

	}
void Update () 
	{
		if(GameObject.Find ("ball").GetComponent<ball_script>().pause)
		{
			gameObject.SetActive (true);
                }
	}
}

and this is part of the script for my character:

public bool pause = false;

void Update()
	{
		if(dead)
		{
			deathCooldown -= Time.deltaTime;

			if(deathCooldown <= 0)
			{
				if(pause = true )
				{
					Time.timeScale = 0;
                                }
		       }
	        }
        }

If you do setActive(false) in Start(), Update is not automatically being called. You have to keep the UI GameObject active but prevent drawing the UI with another boolean or something.

Or you could call canvasObject.setActive(true) from your character script when he dies.