I am working on saving players data and when I run I get the error, "invalid argument #3 (string expected, got table)"
Why could this be?
The error is on line 5
local backpackKey = "user_" .. player.userId .. "_backpack" local backpack = dataStore:GetAsync(backpackKey) local bpObject = Instance.new("StringValue") bpObject.Name = "BackpackItem" bpObject.Value = backpack bpObject.Parent = player
local backpack = dataStore:GetAsync(backpackKey) I believe this line is returning a table of data.
Such as {"value", "value", "value"}.
You be wanting to do something like
bpObject.Value = backpack[1]