Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Is there a way to create a global table?

I am currently creating an RPG and would like to create a global table where all the guilds are stored because I want to save all guild members and the guild name. Can you do that? Tutorials or the like would be helpful (The table should have the same content on all servers)

6 comments

1

Use module scripts and/or bindables.

1

use modules

0

ok but are there any tutorials or something like that?

0

look up questions about it in the search bar

1

try using datastores, it stores data online and works with tables, though i dont suggest using any value types made by roblox (like Vector3, UDim2, etc.)

0

Create a datastore. Create a guild system. On guild creation, invoke a RemoteFunction (since you need to wait for success/failure) that is handled by a script that requires the datastore modulescript. Add it to the queue of guilds to be saved during every autosave interval. When the autosave interval completes, everything inside the queue table should be sent into the datastore.

1 answer

Use a global _G (global variable) to do so. You could have like _G.DataForPlayerName = {blah blah blah}. And you can access it from any script. I would recommend (when trying to access it) to use _G:WaitForChild("DataFor" .. Player.Name) to avoid problems. I hope this helps. I know, I responded 1 year later, but still, helpful nevertheless :)

This discussion is preserved as it was. New answers, comments, and votes are closed.