so i have a table that can be retrieved and saved but the contents of the table aren’t going in their respective values let alone finishing to iterate through the rest of the folder
uh, im using a table like {} but their indexed by the value i, im trying to set the “Saves” Folders values to the values in the table. I do not need to parent anything.
a table is saved not folder, im just trying to get the values from the table and giving it to each number value and string value in the Save Folder. Note they need to go to the correct number value and string value. Saving a table also worked.
Maybe instead it would be best to index the table based on the name of that value then you can look through the indexes and find the value with the same name as the index like for example:
Let’s say I have a table with value wins and 132 values more for some reason.
Now to get specificly the wins in the corresponding spot you would save the table like so
local values = {
[“wins”] = 5
…
-- and so on lol
}
--Then loop through the table and find the corresponding value
local dataFolder = -- where you want the data to go
for name, value in pairs(values) do
local instanceValue = dataFolder:FindFirstChild(name)
if instanceValue then
instanceValue.Value = value
end
end
That actually makes sense since the folder is being counted as part of the index. Like your script is looping through lets say index 1, but that’s a folder so it will skip it…BUT there is actually data that there is on index 1 according to your magic table of 100+ values. So basically it will SKIP value 1.