I have a folder, so I want that player writing information in it and it add to folder that can be use to all servers
COMMUNITY QUESTION
How to add information to game that can be used to all players in roblox studio?
1 answer
You can use shared or _G. They are tables that can be used in any script in the server, even in local scripts.
--Script 1 (Server Script)
shared._helloMessage = "hi"
print(shared._helloMessage) --> hi
--Script 2 (Server Script)
print(shared._helloMessage) --> hi
--Script 3 (Client Script)
print(shared._helloMessage) --> hi
print(_G._helloMessage) --this will print nil because it wasn't identified
print(shared.Money) --this will also print nil because it wasn't identified
but this can only be accessed inside the server and not the other servers
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
i need to all servers
i mean that i need save information to game folder
The only way is to use OrderedDataStores. Most global leaderboards use OrderedDataStore to get all DataStore in all servers.