of     1   

RPG_Dev
#182846642Monday, February 01, 2016 9:42 PM GMT

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.
powerhotmail123
#182846759Monday, February 01, 2016 9:44 PM GMT

Well, you're trying to save a bunch of user data into the DataStore, which it doesn't support. Convert those "stats" into values. So if you had like three IntValues, get their values like: IntValue.Value . Enjoying your stay at the Scripters Forum? Join this! http://www.roblox.com/My/Groups.aspx?gid=2582784
RPG_Dev
#182846795Monday, February 01, 2016 9:45 PM GMT

The stats are values, a mix of string and number values.
RPG_Dev
#182846852Monday, February 01, 2016 9:46 PM GMT

Whoops, read your post wrong.
powerhotmail123
#182846923Monday, February 01, 2016 9:47 PM GMT

local stats = {} for I, V in next, game.Players.LocalPlayer.PlayerGui.Stats:GetChildren() do table.insert(stats, V.Value); end And, you're either using a LocalScript (DataStore doesn't work in a LocalScript) or using a ServerScript (LocalPlayer doesn't work in a ServerScript). Enjoying your stay at the Scripters Forum? Join this! http://www.roblox.com/My/Groups.aspx?gid=2582784
RPG_Dev
#182847136Monday, February 01, 2016 9:51 PM GMT

Can Module scripts use datastores if i use them in a localscript?
ray_revenge
#182847188Monday, February 01, 2016 9:52 PM GMT

no

    of     1