[Declaring & Using Questions] Player Variables

Can someone give me some examples of declaring and using player variables inside resources? I searched all this forum and couldn’t find anything explicit.

For example, when a player connects I want to store his name in a variable that I can later use inside a clientside script.
How can I do that?

Thank you very much!

I mean variables are about as basic as Lua can get. What name are you storing… Usually if you are storing on the server a variable wont work you will need to use a table unless you literally plan on storing one persons name.