Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Min is not a valid member of IntValue Max?

					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?

2 answers

✓ Accepted answer

Your line 3, if descendant.Min and descendant.Max.Value == true then

you forgot the .Value

1 comment

0

Nope, still not it. That line is to check that the IntValue (without the Value part) exists, not to check 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

This discussion is preserved as it was. New answers, comments, and votes are closed.