local DSService = game:GetService('DataStoreService'):GetDataStore('theweirdlolsavedata669') game.Players.PlayerAdded:connect(function(plr) local uniquekey = 'id'..plr.userId local stuff = Instance.new("Folder", plr) stuff.Name = "stuff" local Invun = Instance.new('IntValue', stuff) Invun.Name = "Stat1" local GetSaved = DSService:GetAsync(uniquekey) if GetSaved then Invun.Value = GetSaved[1] else local NumbersForSaving = {Invun.Value} DSService:SetAsync(uniquekey, NumbersForSaving) end end) game.Players.PlayerRemoving:connect(function(plr) local uniquekey = 'id'..plr.userId local Savetable = {plr.stuff.Stat1} DSService:SetAsync(uniquekey, Savetable) end)
Didn't look too in-depth, however on line 22 you forgot to include ".Value" in the array. If this doesn't solve the problem let me know.