I had a working Load/Save Script i got from the toolbox, It was working but it wasn't reliable and i think its because of Async limits(Im trying to save toughly 50-60 IntValues). As a relatively capable scripter I know that i should revert to GetChildren for efficiency. I took that script and am basing my new script on GetChildren(). Its a Sever Script in SeverScriptStorage. Note, I have 3 places in my game. If that affects the outcome. (which i don't think it should)
Question 1. Im aware there is a SetAsync limit. Is the way I did it SettingAsync once, or 1x #Children? If so, how can I reduce it? Q2. Would a table also do 1x #Children? Q3. How would I properly set a table in this situation? Q4. The script I provided isn't even working, am I missing something?
And yes I read the DevForum but it honestly didn't help me to understand it even though they used a table.
Thanks in advance.
local DSS = game:GetService("DataStoreService")
local DATA = DSS:GetDataStore("PlayerData")
-- Load
game.Players.PlayerRemoving:Connect(function(player)
local leaderboard = player:FindFirstChild("LeaderStats")
local stats = LeaderStats:GetChildren()
for i = 1, #stats do
DSS:SetAsync(stats[i].Name, stats[i].Value)
end
end)
-- Save
game.Players.PlayerAdded:Connect(function(player)
local leaderboard = player:WaitForChild("LeaderStats")
local stats = LeaderStats:GetChildren()
for i = 1, #stats do
stats[i].Value = DSS:GetAsync(stats[i].Name)
end
end)

4 comments
P.S. I noticed my --Load and --Save are backwards, but whatever.
P.S.S I noticed I required DATA:GetAsync and DATA:SetAsync. Script works. I'd still like limit questions answered thnaks!
You did DSS:GetAsync() and DSS:SetAsync(), not DATA:GetAsync or DATA:SetAsync()
Because I didn't make that an answer, I won't get notifications if you comment. You can however upvote and then remove it on this comment and I will review what you said