script.Parent.MouseButton1Down:connect(function()
local ds = game:GetService("DataStoreService"):GetDataStore("Stats")
local stats = game.Players.LocalPlayer.PlayerGui.Stats:GetChildren()
local key = game.Players.LocalPlayer.UserId
ds:SetAsync(key, stats)
end)
when I tried loading it, and iterating over the stats table, it said "Expected a table" so it must not be saving it as a table? help please. |