game.Players.PlayerRemoving:Connect(function(player)
local data = {
money = player.leaderstats.money.Value;
strength = player.leaderstats.strength.Value;
newplayer = player.leaderstats.newplayer.Value;
}
local success, errormessage pcall(function()
gameDataStore:SetAsync(player.UserId.."-data",data)
end)
if success then
print("data saved")
else
print("data failed")
warn(errormessage)
end
end)
COMMUNITY QUESTION
Data array not being saved. how do i fix this?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.
