Help with putting personal name in before dialogue

Hello so I have the code for a person to add their own name to my story but every time I put [NAME] then the dialogue I want them to say there is an error with the [NAME].

You still need to use the script name for making that character talk. So if the character’s script name is YOU, it would look like this:

YOU (talk_happy)
Hello, my name is [NAME].

So if someone else is reading my story it will say their name they typed in the part with the character name.
For example

YOU"the actual name they typed"

Yes, if you changed their display name to NAME: