How do you make a text box appear when your player collides with an other Object

I am trying to get it so that when my Player Collides with and Civilian a text box appears with text in it and then fades away or The player has to close the text box by clicking

How would you put this into a script (C#)

Search for ‘GUI’ and ‘fade’ on Unity and you will find lots of hits. Here are a couple includes some code: