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

Can you help with sharing data stores between places?

Asked by 6 years ago

Hello,

I have multiple games, each with a cash leaderboard. I have tried to make it, so when someone leaves the game with cash and deaths, it saves their amount of cash and deaths and then allows the other games to load and save over that value. I don't know if its possible. Can you help?

I do not want to save the variable Stage in any way.

Here is my code so far from ServerScriptStorage:

001local dataStoreService = game:GetService("DataStoreService"):GetDataStore("Deaths")
002local ODS = game:GetService("DataStoreService"):GetOrderedDataStore("WinsFixed")
003local globalDataStoreService = game:GetService("DataStoreService"):GetGlobalDataStore()
004amount = 1
005timedelay = 40
006currencyname = "Cash"
007local Pages = ODS:GetSortedAsync(false,10)
008local Data = Pages:GetCurrentPage()
009local GUI1=game.StarterGui.LeaderboardUI
010local GUI2=game.StarterGui.LeaderboardUI1
011 
012function oa(object)
013    local player = game.Players:GetPlayerFromCharacter(object)
014    if player ~= nil then
015        local ls = player:WaitForChild("leaderstats")
View all 130 lines...

1 answer

Log in to vote
0
Answered by 6 years ago

I have looked into it. The only way to do this type of thing is to store and save data through google docs. This is less than ideal, but it is the only way.

0
Actually, GlobalDataStore can be helpful, here's the link; http://wiki.roblox.com/index.php?title=API:Class/GlobalDataStore Next_Byte 21 — 6y
0
I have looked into to using GlobalDataStores, but I can't get them to work. Can you modify the code attached to make it work? Tweakified 117 — 6y
Ad

Answer this question