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

How would I use the second parameter of Instance:FindFirstChild (recursive)?

I've recently discovered a second parameter of Instance:FindFirstChild, recursive. How would I use it? The wiki doesn't provide an example with recursive.

1 answer

✓ Accepted answer

Basically it functions as a :FindFirstDescendant() (if that were a thing); it will check the children, the children's children, and so on.

An example would be:

print(game:FindFirstChild("StarterCharacterScripts", false)) -- nil
print(game:FindFirstChild("StarterCharacterScripts", true)) -- StarterCharacterScripts

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