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

0

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

0

You are right, it was changed by local script...

0

I didnt knew that

0

Thanks im gonna try it

0

Still dont work

0

Have you tried testing it outside of studio?

0

Yes, does that matter