Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to add information to game that can be used to all players in roblox studio?

Asked by
kiref81 -24
2 years ago

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

1 answer

Log in to vote
0
Answered by 2 years ago
Edited 2 years ago

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

0
i need to all servers kiref81 -24 — 2y
0
i mean that i need save information to game folder kiref81 -24 — 2y
0
The only way is to use OrderedDataStores. Most global leaderboards use OrderedDataStore to get all DataStore in all servers. T3_MasterGamer 2189 — 2y
Ad

Answer this question