Can you use IsDescendantOf() to find out if a instance is a descendant of a certain name? Like if I wanted to know if "Chair "is a decedent of something named "House"
✓ ANSWER ACCEPTED
Can you use IsDescendantOf() with Strings?
1 answer
✓ Accepted answer
No. The argument of IsDescendantOf must be an instance.
An alternative, however, is FindFirstChild. It's a bit different, because you have to use it on the parent to find the child, but it does work with strings. If the name is found, then it returns that instance; if it's not found, it returns nil.
workspace.House:FindFirstChild("Chair")
If you're strict about what you wrote and can't make FindFirstChild work, though, you could always just write your own function to do it.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Looks like I'll have to write my own function :/
It won't be very hard