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

what extent does IsDescendantOf reach?

By the title, I mean how many parents can an object have before the parent equals the parameter for it to return true?

wiki says, "An Instance is considered the descendant of an object if the Instance's parent or one of its parent’s parent is set to the object."

Does this mean IsDescendantOf will return true for only the parent or the parent's parent as the parameter? what about the parent's parent's parent and so on?

1 answer

✓ Accepted answer

IsDescendantOf is, in theory, infinite. So yes, the function accounts for any place in the parent hierarchy no matter how distantly related.

1 comment

0

thank you!

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