How do I have Unity Wait for a keypress?

What I'm trying to do is create an RPG, and when you go and talk to people a message window comes up. I'm able to put the message window up along with the text, but I'm having trouble keeping program execution from continuing until after the user has pressed Enter. I tried making the program go into a while loop that waits until a key is pressed but that doesn't work as it causes Unity to crash right when I start the game. Is there any other alternative?

Don't use Update, which executes every frame and can't be interrupted. Use coroutines.

function Start () {
    while (true) {
        while (!Input.GetKeyDown(KeyCode.Return)) yield;

        // do stuff
    }
}