My script:
function MakeSomethingNext(obj,funct) for _, subobj in pairs(obj:GetChildren()) do funct(subobj) MakeSomethingNext(subobj,funct) end end function YourInventoryTable(inv) local Table = {} local parent MakeSomethingNext(inv,function(obj) local typ if #obj:GetChildren() > 0 then typ = "Store" Table[obj.Name] = {} parent = obj.Name else if obj:IsA("ValueBase") then local link = Table[obj.Name] -- Don't work. if parent then link = Table[parent][obj.Name] -- Hov to fix it? end typ = "Value" link = obj.Value -- Is there another way to create this? end end end) return Table end
But i don't know how to make importing to subtables. How to make it? Help!
It doesn't work! I'm confused.