So i made a pause menu for my game and it works on the first level but doesnt work on any other levels, anyone have any idea as to why this is?

The script that i use for all the buttons in the menu

#pragma strict

var pauseKey : KeyCode;

var PauseActive : GameObject;

function Update () {
	if (Input.GetKeyUp(pauseKey) && PauseActive.GetComponent(Canvas).enabled == false){
		Pause();
	}else if (Input.GetKeyUp(pauseKey) && PauseActive.GetComponent(Canvas).enabled == true){
		UnPause();
	}
}

function Pause () {
	PauseActive.GetComponent(Canvas).enabled = true;
	Debug.Log("Paused");
	Time.timeScale = 0f;
}

function UnPause () {
	PauseActive.GetComponent(Canvas).enabled = false;
	Debug.Log("Un-paused");
	Time.timeScale = 1f;
}

function SaveGame () {
	PlayerPrefs.SetInt("LevelNumber", Application.loadedLevel);
	Debug.Log("Game has been saved!");
}

on the first level if i press the pauseKey the ui shows up and all the buttons are selectable, if i do it on the second level or any other level it shows the ui but the buttons arent selectable i have it setup in the exact same way on ever scene. if anyone has any ideas how to fix this please let me know as its been frustrating me for 3 days now!

I fixed the issue, turns out i am stupid and had forgotten about the EventSystem needing to be in the scene. very sorry to have wasted everyone’s time.