why cant i use "Local player" in clientside?

[LUA]local textname = vgui.Create(“DLabel”, SheetItemThree)
local self = LocalPlayer()
Stones: " … self.stones … "
Metal Pieces: " … self.metal_pieces … "

Levels :" … "
Mining level: " … self.mining_level")[/LUA]

attempt to concatenate field ‘stones’ (a nil value)

what am i doing wrong?

Does ‘stones’ exist? try doing above

self.stones = “Hello”

Or post the full code

Because stuff you define serverside doesn’t automatically get transferred to the client.

Try NWVars if you want it to be easy, or usermessages for less networking.

how do i make NWvars? i would appreaciate it if you told me :slight_smile:

This is what you do to “make NWVars”

You read it up on the wiki rather than asking us to spoonfeed you code.

there is nothing cold “NWvar” on the wiki :confused:

i have heard of it, but idk how to make them



i will try it, im trying to make a variable for every clients, like money.

if(SERVER) then
function _R.Player:SendCashUM()
umsg.Start(‘Stones’, self)
usermessage.Hook(‘Stones’, function(um)
LocalPlayer().stones = um:ReadLong()

Probably shouldn’t try explaining usermessages to this guy. He seems to have no knowledge of networking. (Or anything else…)

its solved, i forgot to post sorry