So I have many variables for players and I load them in like this:
for i = 100, 1, -1 do
local Item = Instance.new("StringValue", ItemData))
Item.Name = "Item" ..i
Item.Value = Data.(ItemPosition ..i)
end
Not sure how to make the line above work, or even if it is possible, here it is again:
Item.Value = Data.(ItemPosition ..i)
The values are loaded above, here's one:
local Data = DataStore:GetAsync(Player.userId) or {}
Data.Item1 = Data.Item1 or 0
Data.Item2 = Data.Item2 or 0
Data.Item3 = Data.Item3 or 0
--etc..
Not sure if you can make that quicker too as well ^
