Time.timeScale = 0 did not prevent click

Holla Uniters ! i try to figure out how to pausing a game… after awhile of searching i found out there are a lot of way to do it…
but i comes up with the easiest(i think) way to do it.

So, part of my code is

function Start{
   Time.timeScale=0
}
function OnGUI{
   If(GUI.Button(new Rect(100,100,50,50),"next")){
       Time.timeScale=1;
   }
}

ok, it works perfectly, but… in the background of this i have some GUI Button attached to the screen, and when i press “Play” i can still press the GUI Button, and is affecting game, although it doesn’t move the player… but after i press “next” my character start moving because of action i do before… could anybody help me?

How exactly i could make, say, i want to blackout all the back screen OR i want so that player couldn’t touch anything until they press “next”

Your code shouldn’t work. This does nothing:

Time.timeScale=1;

If you don’t want some things to be possible, don’t allow them or hide them if timescale==0. Unity doesn’t do that for you, or you wouldn’t be able to leave pause again if all Buttons stopped working.