GUItext not updating

I have a problem with my guitext not changing nomatter what I do.(c#)

In one script I have

public int GemsGained= 0;

Thene evertime I click an item with the gem type is is added to the amount collected

public void OnMouseUp(){
    if(gameObject.tag == "gem"){
        //Debug.Log ("it's called");
        }
    item= true; 
    renderer.enabled = false;
    GemsGained++;

All works so far, debugged it and it works fine. Thene in another scipt that I want to attach to a GUItext to update how many you have found, I added this.

void Update () {
        {

    guiText.text =GemsGained.ToString();
    }

Also tries ""+GemsGained, and so on, but it's not updating, it's stuck at 0 nomatter what I do, even pulling up the number of gems you start with doesn't move it from 0.

Any idea's?

Try making that public int be a static int?

public int GemsGained = 0;

Edit: Then add this to the GUIScript

public int GemsShown = GemsGained;

void Update{
GemsShown = GemsGained;
guitext.text = GemsShown;
}

Edit2: If that doesn't work then try calling it like this

 void Update{

 guitext.text = **insert script name here**.GemsGained;

}