local DSService = game:GetService('DataStoreService'):GetDataStore('ADataStore111111')
game.Players.PlayerAdded:connect(function(plr)
local uniquekey = 'id-'..plr.userId
local leaderstats = Instance.new('IntValue', plr)
local savevalue = Instance.new('IntValue')
leaderstats.Name = 'leaderstats'
savevalue.Parent = leaderstats
savevalue.Name = 'Money'
local GetSaved = DSService:GetAsync(uniquekey)
if GetSaved then
savevalue.Value = GetSaved[1]
else
local NumbersForSaving = {savevalue.Value}
DSService:SetAsync(uniquekey, NumbersForSaving)
end
end)
game.Players.PlayerRemoving:connect(function(plr)
local uniquekey = 'id-'..plr.userId
local Savetable = {plr.leaderstats.Cash.Value}
DSService:SetAsync(uniquekey, Savetable)
end)
I would think that using this to hold more than 10+ items would be tedious and un-professional if that makes any sense
Is there any simpler way I can do this or any tutorials you can link me to?

1 comment
Don't come on this site with alvinbloxx's code, expecting for it to be fixed.