Basic Lua Question about passing varibles

I tried searching but its disabled for some reason.

Im trying to get a value thats on the server (amount of money player has) on to the clients hud, how can i pass this variable to the client? Its really annoying my dumb brain

You can do send a umsg
then on the client you would recieve it and store it in an variable.
And draw the variable.
Also send it everytime you change it!

thx, im reading it now, i knew there must be a simple way

Three options.

Player:SetNW*( key, value ), Player:GetNW*( key, value, default ). I think default is still a valid key.
Player:SetDT*( index, value, Player:GetDT*( index ). Index must be between 0 and 3 inclusive.
Use usermessages to send the data to the player.

The first two are easier methods, and are useful if you want to easily network the information to all players. If you only want each client to know their own money, the third choice is what you want to use.

The thing about NWVars is that they should only be used when everyone needs to know something, but the money is somewhat private/local to one player, the others don’t need to know it.