So i recently tried making stats using Tables and using DataStores with them and everything works perfectly but when i use a for loop to create the stats it doesn't load the stats correctly.
for StatName, Value in pairs(StatsValues) do local svalue = Instance.new("IntValue",stats) svalue.Name = StatName svalue.Value = DataStoreService:GetDataStore(Store):GetAsync(Player.UserId) or Value end
From what i've heard it's because it only loads the data from the very first value of the table.
What i mean is: I have 3 or more stats in one table. the first stat is set to false but the rest is set to true. It'll only load the data of the first stat saying every value is false