Gui Text not showing up when I click play...

Well, I have a script for xp and hp systems for my character. The script includes displaying the stats in Gui. The xp gui works, but the hp one doesn’t. What happens is that the hp stats pop up for a second after i click play, but then they disappear, and turn into Guitext. Please help me figure this one out. Thanks!:slight_smile:

I think so, you haven’t create GUIText object in Hierarchy panel.
First create the GUIText object in Hierarchy and assign the same object to script as a GUIText.

c#

void OnGUI()
{
GUI.Label (new Rect(0,0,100,20),curHealth);
}

js

 function OnGUI () 
 {
 GUI.Label (Rect(0,0,100,20),curHealth);
 }