local descendants = part.Drops:GetDescendants() for index, descendant in pairs(descendants) do --error here if descendant.Min and descendant.Max == true then local randNum = math.random(descendant.Min.Value, descendant.Max.Value) for count = randNum, randNum do descendant:Clone() end end --rest of non important code i guess
So its supposed to get descendants of the item drops of the item, stored in a group, which it does, but when i try to make another loop in the loop i get the error Min is not a valid member of IntValue "Workspace.Tree.Drops.WoodChunk.Max". How could i do this so it works?
Your line 3,
if descendant.Min and descendant.Max.Value == true then
you forgot the .Value
Sorry for the late comment, i fixed the issue by myself some time ago. I had to use GetChildren, because GetDescendants gets even the children of the children