text problem

I have some text that appears when I approach a door (in game hint), how do I make the text go away after 5 seconds? I am new to programming unity and would appreciate any help.

Look up coroutines.

void MakeText
{
    // create the text
    StartCoroutine(DeleteText(5));
}

IEnumerator DeleteText(float delay)
{
    yield return new WaitForSeconds(delay);
    // delete the text
}

You can also use Invokes.

http://unity3d.com/support/documentation/ScriptReference/MonoBehaviour.Invoke.html

void ShowText
{
  //Show the text to the player
  Invoke("HideText" , 5);
}

void HideText()
{
  //Hide Text here
}