mouse displays GUI text when on objects

Still learning scripting over here, starting small. I know this is simple but need help

I got this script here;

var textObject : GUIText;
function OnMouseOver () {
textObject.text =;

Now this script shows the name of the object when you hover over it, however it stays on screen. How can I make it disapeer again? So when i look at the object the text appear, when i look away the text is gone and so on. I think i need to use something like function OnMouseExit(){ ?

If you please know a other way which is easier, give me ! thanks


function OnMouseExit()
   textObject.text ="";

Althought I would recommend disabling the object.


made the scirpt on my own, proud of my self now if anyone wants it just say