I have two scripts, one a server script and the other a local script. I want to create a table in the server script and read it from the local script using _G. How do I do that?
Server Script (ServerScriptStorage)
_G.Inventory = {
BodyTypesOwned = {"defualt", "spiky"},
BodyColorsOwned = {"2", "3"}
}
Local Script (Player Gui)
for i,v in pairs(_G.Inventory["BodyTypesOwned"]) do
print(i, v)
end
for i,v in pairs(_G.Inventory["BodyColorsOwned"]) do
print(i, v)
end

3 comments
_G are global variables
What do you mean?
It seems your a beginner heres a question Ive already answered: https://scriptinghelpers.org/questions/100276/what-are-_g-and-_version-what-they-are-used-for-and-how-to-use-them#92663