Does FindFirstChild comes only with an " if statement "

Does FindFirstChild comes only with an " if statement "

1 Like

What do you mean

1 Like

Like does it only check if there’s an instance inside a specific service?

e.g: if workspace:FindFirstChild("Part") then

1 Like

In your example, the code would progress with the if statement if anything named “Part” exists, directly under Workspace.

FindFirstChild:

  • Returns the instance if it finds anything
  • Returns nil if it doesn’t
2 Likes

Is that all what it does?

[letmepostpls]

1 Like

no it doesn’t
instance:FindFirstChild(“name”)
gives you the same thing as instance.name
unlike instance.name, script doesn’t error if instance.name doesn’t exist if you use :FindFirstChild. instead it returns nil

1 Like

Well, yes, it does what the name suggests. What would you want more?

1 Like

Nothing lol.

I just wanted to know all its functions.

Also thanks for answering!

2 Likes

I believe, You can also use recursive

1 Like

Aha I get it.

Thanks for answering!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.