generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Global Table

Previous Thread :: Next Thread 
jjwood1600 is online. jjwood1600
Joined: 14 May 2013
Total Posts: 1633
05 Jan 2015 02:00 PM
Hi guys!
Is it possible to create a "Global table" (same as a normal table, but can be accessed from anywhere in the game) and then use other scripts to read/write to/from it?
Thanks
jj
Report Abuse
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
05 Jan 2015 02:02 PM
one already exists _G

FilteringEnabled messes it up though
Report Abuse
error9999 is not online. error9999
Joined: 05 Sep 2009
Total Posts: 1593
05 Jan 2015 02:02 PM
Save the whole table as 1 big string to the datastore
Then when you need it get it and make a new table of it c:
Report Abuse
jjwood1600 is online. jjwood1600
Joined: 14 May 2013
Total Posts: 1633
05 Jan 2015 02:06 PM
^ Would you mind telling me how to do that please? Thanks :)
Report Abuse
error9999 is not online. error9999
Joined: 05 Sep 2009
Total Posts: 1593
05 Jan 2015 02:12 PM
I've just checked the _G functions

They are easier I guess,
It's like a global thing which I guess is the same as a module script?
Report Abuse
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
05 Jan 2015 02:14 PM
No, not the same at all.
Report Abuse
jjwood1600 is online. jjwood1600
Joined: 14 May 2013
Total Posts: 1633
05 Jan 2015 02:15 PM
So, the best way would be to....

Create a global table in a script using global function (I would have to try and find out how to do that and also hope that FilteringEnabled doesn't break it)
Access the table and change it and store stuff in it and take data from it, delete stuff from it from other scripts??
Thanks
jj
Report Abuse
error9999 is not online. error9999
Joined: 05 Sep 2009
Total Posts: 1593
05 Jan 2015 02:22 PM
Or just make a model with all table values in it c:

that's easy for making the table
Just this;
for i, value in pairs(model:GetChildren()) do
table.insert(tab, value)
end

easy c:
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image