Hello, I’m trying to figure out how to assign a string to my gui text. I’ve already tried this
function Start () {
}
var go = GetComponent("currentHealth");
function Update () {
var chealth = go.ToString();
guiText.text = chealth;
}
but when I enter the game the gui says “null”. For some reason it isn’t getting access to my health script. The health script isn’t attached to the gui. How do I access the health script correctly? I’ve already tried a few other ways but nothing teems to work.