how to make an in game charachter saying something when close enough.

in a text box, like in the populair zelda series.

like when your 3 meters in front, a box pops up with with “hey”

I prefer javascript (:

TY in advance for anyone giving me the code

Try to start with OnTriggerEnter

…Please don´t make double posts and delete your similar question here.