Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

What does the "FindFirstChild" word exactly do? [closed]

Asked by 6 years ago

Hello, I would like to know what it exactly does, I not really new to the scripting, but I would like too know!

Thanks!

Closed as Not Constructive by adark, lukeb50, and User#5423

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

2 answers

Log in to vote
0
Answered by 6 years ago

:FindFirstChild() is a method used for locating a child. This method is usually used to confirm the existence of a child inside a Instance.

It needs to pass a argument through the parenthesis. However, it can also be used optionally for a second parameter that will search through every descendant.

The wiki page for this method is located here.

A example of the method being used is :FindFirstChild("Part") or :FindFirstChild(game.Workspace.Part.Name)

Ad
Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

Well, it finds the first child of the specified object. So, if I wanted to find the first object named "Part" in the Workspace, I'd do this:

Part = workspace:FindFirstChild("Part")