(JS) Touch pause menu issue

Hello everyone!
I’ve made a script, witch checks if the touchpad is touched and stops time, setting the variable paused = true, hiding the HUD(including the touchpad) and displaying the GUI.Button. The problem is: after the touchpad(named lePauseButton) is touched IT DOESN’T DISPLAY THE BUTTON.
Here’s the script:

var lePauseButton : Joystick;
	lePauseButton.active = true;
var paused : boolean = false;

var resumeButton : Texture2D;

var hud : GameObject;
	hud.active = true;

function Update () {	
	if (lePauseButton.IsFingerDown() && !paused){
		print("Paused");
		Time.timeScale = 0.0;
		paused = true;
		
		hud.active = false;
		lePauseButton.active = false;
	}
}    //it's like the script from now on doesn't even exist.

function OnGUI () {
	if(paused){
		if(GUI.Button (Rect (Screen.width/2 - 100, Screen.height/2 - 200, 200, 100), resumeButton)){
			print ("Unpaused");
			Time.timeScale = 1.0;
			paused = false;
		
			lePauseButton.active = true;
			hud.active = true;
		}
	}
}

That’s pretty much it, I’ve spent over 5 hours on studying the sctipt, raped the google for answer but i couldn’t find a thing.
Help will be much appreciated.
Take Care!

The reasons for OnGUI not be called are : 1) the function’s name is incorrect (not your case). 2) The gameObject is inactive. 3) The component is disabled. I doubt that your problems is in those three cases.

FIRST IDEA : A timeScale null won’t stop the GUI call, that would be unfortunate for a pause menu. So the problem comes from the boolean “paused”. I don’t think you ever get the print “Paused”, which means the input is incorrect. I don’t code on mobiles so I can’t help, but I’m sure there is a lot of informations about it.

SECOND IDEA : The pause works, the GUI button is drawn, however the texture is incorrect. Missing, too big, doesn’t fit, you name it. Try with a string first. The button style should be visible however, so this seems unlikely.