Please help noob to understand few things about how to cahge global vars.

Hello guys. I’m new in LUA, so my question looks dumb for you. But please help me :slight_smile:

I want to change global var. The point is that global initialize in main file (client) and function that changes it in another (server). I try to make the function starts with hook PlayerDeath, but the problem is that value not changes and it still uses initialize value.

How can i do that another file function value changes overrides globals in another? Will appreciate any help.

P.S sorry for my bad english :slight_smile:

You cannnot change a CLIENTSIDE global variable from SERVERSIDE file. You MUST network the change using a net message or any other form of networking.

You COULD use Set/GetGlobalInt/String for as well.

Thanks a lot for the answer :slight_smile: