I took that script from my leaderstats datastore script & changed value to save. Also this is server script. Please Help, i need that for my christmas update, one last thing to do! Script:
local ds = game:GetService("DataStoreService"):GetDataStore("QuestData")
game.Players.PlayerAdded:Connect(function(plr)
wait(1)
local plrkey = "id_"..plr.UserId
local save1 = plr.PlayerGui.QuestGui.CompletedData
local GetSaved = ds:GetAsync(plrkey)
if GetSaved then
save1.Value = GetSaved[1]
else
local NumberForSaving = {save1.Value}
ds:GetAsync(plrkey, NumberForSaving)
end
end)
game.Players.PlayerRemoving:Connect(function(plr)
ds:SetAsync("id_"..plr.UserId, {plr.PlayerGui.QuestGui.CompletedData.Value})
end)

7 comments
Uhm, did you check if the value of 'CompletedData' is always changed by a server script? It is in the playergui and there is a chance you changed it locally. It can also be because you add a extra 'NumberForSaving' in line 11
You are right, it was changed by local script...
I didnt knew that
Thanks im gonna try it
Still dont work
Have you tried testing it outside of studio?
Yes, does that matter