Ad
Log in to vote
0

How would I make a script where it saves data from one game to multiple places in the game?

Asked by 5 months ago

I have a game that has multiple places in it(Because of the min map size of the world & keep lag down) How would I make a script that would save data to all the places?

1
you're going to need to put all places in the same Game Universe, Then their DataStoreService is shared (the same across all the games in the same universe) RubenKan 2841 — 5mo
0
Basically what I did (Because I just solved this exact problem today) was make a datasavescript that saves data and copy and paste the whole script on every place. It worked for me, but it may not for you. GottaHaveAFunTime 134 — 5mo

1 answer

Log in to vote
0
Answered by
4D_X 111
5 months ago

Use the datastore feature. It's used as a database for points, coins, well really anything that is a integer.. Use the Wiki for help. [Use the datastore feature. It's used as a database for points, coins, well really anything that is a integer.. Use the Wiki for help. Use the datastore feature. It's used as a database for points, coins, well really anything that is a integer.. Use the Wiki for help. [Use the datastore feature. It's used as a database for points, coins, well really anything that is a integer.. Use the Wiki for help. http://wiki.roblox.com/index.php?title=Data_store Ex:

local DataStoreService = game:GetService("DataStoreService")
local playerExperienceStore = DataStoreService:GetDataStore("PlayerExperience")

local playerExperience = 0
pcall(function()
    playerExperience = playerExperienceStore:GetAsync("player_1234")
end)
Ad

Answer this question