Pause Menu?

So after watching a video I think I understand how this code should work and setactive does not turn off my pause menu I have the pauseUI selected as the object rigged to the main camera and nothing happens perhaps the tutorial I was watching is outdated or it’s because I have more then one scene?
My problem isn’t with stopping time it’s with setting my canvas to false so that I don’t have a pause menu in the middle of my screen.
This is my first project in unity so I don’t really understand much in terms of programming.

So it turns out the weirdest fix I’ve done was changing my void’s to FixedUpdate save then change it back… I don’t know what caused it to work or if my void’s weren’t right before but it’s working.

using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class Pause : MonoBehaviour {
public GameObject pauseUI;
private bool paused = false;
void Start(){
pauseUI.SetActive(paused);
}
void Update(){

	if (Input.GetButtonDown ("Pause")) {
		paused = true;
	}
	if (paused == true) { 
		pauseUI.SetActive (true);
		Time.timeScale = 0.0f;
	}
	if (paused == false){ 
	
	pauseUI.SetActive (false);
	Time.timeScale = 1;
		Debug.Log ("I am Working");
}

}
}

Check your Start() Function it should be Like.

Start()
{
paused = false;
}

Instead of

Start()
{
pauseUI.SetActive(paused);
}

yes and look if u have any other scripts where u use the Time.timeScale

I have a spawning script that uses Time.Deltatime does that count?
and sorry about the poor coding I legitimately just copied this off a tutorial
I’m going to show an edited version of the code that just throws a bunch of errors from trying to change it to a public canvas it has to be a gameobject for setactive to work