Are _G Values used anymore for data? Example
_G.Cash = Instance.new('IntValue')
_G.Cash.Value = 100
-- instead of
local cash = Instance.new('IntValue')
cash.Value = 100
Are _G Values used anymore for data? Example
_G.Cash = Instance.new('IntValue')
_G.Cash.Value = 100
-- instead of
local cash = Instance.new('IntValue')
cash.Value = 100
Here's some decent references for events
A remote event is useful for client-server/server-client communications http://wiki.roblox.com/index.php?title=Remote_Events_and_Functions
A bindable event is useful for server-server communications http://wiki.roblox.com/index.php?title=API:Class/BindableEvent&redirect=no
Scripting helpers even made their own guide(s) https://scriptinghelpers.org/guides/server-client-relationship-in-roblox https://scriptinghelpers.org/guides/how-to-use-remoteevents-properly
Oh i know how to use them, but does _G work well in filtering enabled, I get you can refer player as a parameter in them is that why?
_G is just inefficient in general and I would advise not using it
There is one _G variable per machine so the _G variable on the server would be different from the _G variable on each client.
This discussion is preserved as it was. New answers, comments, and votes are closed.
3 comments
Using events is a far better option than using global functions
Please give an example of like events
You can also use ModuleScripts instead of _G