I've tried many ways to do this and none of the scripts worked. Such as like:
for i,v in pairs(player:WaitForChild("PlayerSkins"):GetChildren(child)) do v.Name = child.Name v.Value = child.Value end
That and other methodes that didn't work! I'm getting frustrated since I'm looking for a solution for 1 entire day. If someone knows how to save values inside a folder and load them when a player enters I would be really really gratefull. For real, help someone.
There are guides telling you the basics of how to work with DataStores, so I will only show you how to convert a list of IntValues into something you can save:
local values = {} for i, child in ipairs(player:WaitForChild("PlayerSkins"):GetChildren()) do values[i] = {Name=child.Name, Value=child.Value} end --You should now be able to save 'values' --When you load it, you might do something like this. Say you've loaded it into 'values': for i, v in ipairs(values) do local name, value = v.Name, v.Value --You must now convert the name/value into a PlayerSkins. Of course, you can save/load other information besides Name/Value, just modify the save/load loops end
Just make sure that every table you save is either an array (uses only consecutive integer keys -- that is, no holes/nil values in the middle) OR uses only string keys (I can't recall if it can have any non-integer keys, but you can test this yourself if you ever need it).