Hotfixx 1 Posted July 15, 2017 Just got a question about variables: When you change a variable, does it execute on the client and only the client, or does it broadcast globally and across a full server. For instance, if I was to do "variable = 1" would it equal to one for everybody, or just that player? - Hotfix Share this post Link to post Share on other sites
Tankbuster 1746 Posted July 15, 2017 variable = 1 is a global variable. It would exist across the machine its on. So if you execute variable = 1 it on a client, it will be in all the client side scripts. If you execute it on a server, it will be in all the server scripts. If you want it to be everywhere, you have to make it public using publicVariable "variable" after you change its value. The third type, which you didn't ask about, but it would seem sensible to know about it is a local variable. They always begin with a single underscore, so, _variable. Where they exist is a little more complicated because you have to understand their scope within a script. https://community.bistudio.com/wiki/Locality_in_Multiplayer https://community.bistudio.com/wiki/Variables Share this post Link to post Share on other sites