Viewing text when colliding, then canceling

I have a guitext called "Printer". I want to know how to make it that the first time (and only the first time) the player walks on an object called "Warning" the text in "Printer" will change to "Ambush" for 5 seconds then change back to blank.

Thank you for your time!

var text = "";

//On colision with the object (Walking on it)
function changeText()
{

    text = "Warning";
    yield WaitForSeconds(5);
    text = "Ambush";
    yield WaitForSeconds(5);
    text = "";

}

The text would be printer I'd assume... This might work though =). Put in it's own method, and call the method in the collision.

Might work =). Didn't test though.