GUIText Not Updating

Hello, I have a problem with GUIText. Currently in my code i have an EXP system in which currentXP is being added +1 everytime function Update runs. My player(playerPrefab) has the Levelsystem script on it and works fine. But when i start the game, the GUIText does not update until i exit out of the game. My playerPrefab has the Component of the level script and has a GUI Layer on it. I have an GUIText that i made into a prefab and added it to the guiTextEXP and to the hierarchy. Is there a way for real time updating like while moving?


function spawnPlayer1(){
    Network.Instantiate(playerPrefab, spawnObject.position, Quaternion.identity, 0);
    camHarness = GameObject.Find("CamHarness");

	cam.transform.parent = camHarness.transform;
    cam.transform.parent = playerPrefab.GetComponent("CamHarness");
    playerPrefab.AddComponent("LevelSystem"); // LevelSystem is the EXP script. It just adds 1 to a variable every time it loops


    var guiTextEXP: GUIText;
    var guiTextLevel:GUIText;
    var currEXP : int = 0;
    var maxEXP : int = 100;
    var currentLevel : int = 1;
    var levelUp = false ;
    function Start(){
    function Update () {
        if(currEXP >= maxEXP) {
            currentLevel += 1;
            levelUp = true;
        if  (levelUp){  
        maxEXP *= 1.2;    
        currEXP = 0;
        levelUp = false;
        guiTextEXP.text = "EXP:" + currEXP+" / " + maxEXP;
        guiTextLevel.text = "Level: " + currentLevel;

If guiTextEXP is a prefab reference then you will need to use Instantiate() to create an instance from the prefab then set the text on that instead of setting the text on the prefab.

Alternatively you could use a GUIText added to your scene instead of a prefab.

In general it is important to remember that only instances of prefabs should be modified while running a game.