Change Text Color

Hi,
I have this code on my word:

function Update () {
 
renderer.material.color = Color.red;
 
}

But this is on a Start Game button so when I put this code on it also:

var isQuit=false;

function OnMouseEnter(){
//change text color
renderer.material.color=Color.grey;
}

function OnMouseExit(){
//change text color
renderer.material.color=Color.red;
}

function OnMouseUp(){
//is this quit
if (isQuit==true) {
//quit the game
Application.Quit();
}
else {
//load level
Application.LoadLevel(0);
}
}

function Update(){
//quit game if escape key is pressed
if (Input.GetKey(KeyCode.Escape)) { Application.Quit();
}
}

And this part of the code does not work:

function OnMouseEnter(){
//change text color
renderer.material.color=Color.grey;
}

function OnMouseExit(){
//change text color
renderer.material.color=Color.red;
}

I think this is because the first code is blocking out the grey. How do I fix this?

I don’t really understand your question… or what you want to do exactly

But, what I can tell you is that in your code the Update function (which is called every frame) sets your material color to red, so you will never have anything other than red…