3D Text - How to change colour - Doesn't seem to work

Okay so my script is below, and if I view it on my font materials the colour changes, however it doesn’t change when on the actual game view? - very odd, anyone got any input on how I can fix this? - I’m doing a very basic Main Menu.

var isQuit=false;

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

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

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

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

// try this
gameObject.GetComponent().color = Color.red;

I am assuming that, in the game view, when you hover the mouse over the 3D text (hence OnMouseEnter), you want it to change to red, and when you leave the mouse from the 3D text (hence OnMouseExit), you want it to change it back to black.

If thats the case, changing color of the text in the game, it is possible that you didn’t add a collider to the 3D text. A collider is absolutely necessary for the OnMouseEnter/OnMouseExit to function, as it allows detection of the mouse.

Solution:

Select the 3D text, then go to its inspector.

Add Component - Physics - Box Collider

Select the Box Collider, and you should see a green wireframe on the scene view.

Adjust the collider to fit the text.

If successful, the 3D text should recognise the mouse and should be able to change color.

This is my best suggestion that I can provide, and it’s possible that this isn’t what you are looking for. If so, sorry about that.
My only favor from you is to be specific with your question, as I can also assume that you want to see the change of your font material color in game.

Good day.