FindFirstChild (Function)
From Legacy Roblox Wiki
|
Example
--This looks in the Workspace for anything named "Brick", -- and sets the variable "found" to whatever object it finds. -- if nothing is found, then found is nil. found = Workspace:FindFirstChild("Brick") if found ~= nil then -- This makes sure that it actually found something. found.Name = "blah" --Sets the object's name to "blah" end
Recursive
The recursive argument is optional. If given, Recursive sets whether the function should look inside of objects in the calling object, as well as the calling object. If not given, the default is false.
For example, if there is a part in Workspace called "Part" and you use:
part = Game:FindFirstChild("Part", true)
It will find the part.
part = Game:FindFirstChild("Part", false)
OR
part = Game:FindFirstChild("Part")
Will not.