In-Game dialouge

hi
I want to make a in-game dialogue and I made it like this :

if (GUI.Button(new Rect((Screen.width / 2)-400 , (Screen.height / 2) + 150, 750, 50), "Hello!"))
            {
                GUI.Label(new Rect((Screen.width / 2) , (Screen.height / 2) , 520, 20), "Hi!");
                Debug.Log("Hi!");
            }

this code work good. the button rendered … when I clicked on it, the debug message came but the label (the replay) didn’t came! so i didn’t know what to do. is there any other code to say “when i clicked on button , the text come up”?

The reason why the button is not show is because it is only getting rendered the first frame of when you click the GUI button. In order for it to show all the time after you clicked “Hello” is by having a variable keeping track of whether or not the button was pressed:

private var buttonPressed = false;

function OnGUI (){ 
    if(GUI.Button(new Rect((Screen.width/2)-400,(Screen.height/2)+150,750,50),"Hello!")){
        buttonPressed = true;
        Debug.Log("Hi!");
     }
if(buttonPressed)
    GUI.Label(new Rect((Screen.width / 2) , (Screen.height / 2) , 520, 20), "Hi!");
}