<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.starfall.wtf/index.php?action=history&amp;feed=atom&amp;title=FindFirstChild_%28Function%29</id>
	<title>FindFirstChild (Function) - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.starfall.wtf/index.php?action=history&amp;feed=atom&amp;title=FindFirstChild_%28Function%29"/>
	<link rel="alternate" type="text/html" href="https://wiki.starfall.wtf/index.php?title=FindFirstChild_(Function)&amp;action=history"/>
	<updated>2026-07-28T16:17:12Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.starfall.wtf/index.php?title=FindFirstChild_(Function)&amp;diff=563&amp;oldid=prev</id>
		<title>PRG: Created page with &quot;{| |&lt;onlyinclude&gt; {{Function| name                  = FindFirstChild |arguments            = String &#039;&#039;&#039;Name&#039;&#039;&#039;[, Bool &#039;&#039;&#039;recursive&#039;&#039;&#039;] |returns              = Instance &#039;&#039;found object&#039;&#039; |description          = Returns the first child found with a name of &#039;&#039;&#039;Name&#039;&#039;&#039;. Returns &#039;&#039;nil&#039;&#039; if no such child exists. |object               = Global |}}&lt;/onlyinclude&gt; |}  ==Example== &lt;pre&gt;  while true do  --Starts up a While loop   found = game.Workspace:FindFirstChild(&quot;Bri...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.starfall.wtf/index.php?title=FindFirstChild_(Function)&amp;diff=563&amp;oldid=prev"/>
		<updated>2024-12-11T10:31:26Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{| |&amp;lt;onlyinclude&amp;gt; {{Function| name                  = FindFirstChild |arguments            = &lt;a href=&quot;/index.php/String&quot; title=&quot;String&quot;&gt;String&lt;/a&gt; &amp;#039;&amp;#039;&amp;#039;Name&amp;#039;&amp;#039;&amp;#039;[, &lt;a href=&quot;/index.php/Bool&quot; title=&quot;Bool&quot;&gt;Bool&lt;/a&gt; &amp;#039;&amp;#039;&amp;#039;recursive&amp;#039;&amp;#039;&amp;#039;] |returns              = &lt;a href=&quot;/index.php/Instance&quot; title=&quot;Instance&quot;&gt;Instance&lt;/a&gt; &amp;#039;&amp;#039;found object&amp;#039;&amp;#039; |description          = Returns the first child found with a name of &amp;#039;&amp;#039;&amp;#039;Name&amp;#039;&amp;#039;&amp;#039;. Returns &amp;#039;&amp;#039;nil&amp;#039;&amp;#039; if no such child exists. |object               = Global |}}&amp;lt;/onlyinclude&amp;gt; |}  ==Example== &amp;lt;pre&amp;gt;  while true do  --Starts up a While loop   found = game.Workspace:FindFirstChild(&amp;quot;Bri...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{|&lt;br /&gt;
|&amp;lt;onlyinclude&amp;gt;&lt;br /&gt;
{{Function|&lt;br /&gt;
name                  = FindFirstChild&lt;br /&gt;
|arguments            = [[String]] &amp;#039;&amp;#039;&amp;#039;Name&amp;#039;&amp;#039;&amp;#039;[, [[Bool]] &amp;#039;&amp;#039;&amp;#039;recursive&amp;#039;&amp;#039;&amp;#039;]&lt;br /&gt;
|returns              = [[Instance]] &amp;#039;&amp;#039;found object&amp;#039;&amp;#039;&lt;br /&gt;
|description          = Returns the first child found with a name of &amp;#039;&amp;#039;&amp;#039;Name&amp;#039;&amp;#039;&amp;#039;. Returns &amp;#039;&amp;#039;nil&amp;#039;&amp;#039; if no such child exists.&lt;br /&gt;
|object               = Global&lt;br /&gt;
|}}&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
while true do  --Starts up a While loop&lt;br /&gt;
  found = game.Workspace:FindFirstChild(&amp;quot;Brick&amp;quot;)  --This looks in the Workspace for anything named &amp;quot;Brick&amp;quot;, and sets the variable &amp;quot;found&amp;quot; to whatever object it finds.&lt;br /&gt;
&lt;br /&gt;
  if found ~= nil then  -- This makes sure that it actually found something. If the variable is nothing, then it ends.&lt;br /&gt;
&lt;br /&gt;
    found.Name = &amp;quot;blah&amp;quot;  --Sets the object&amp;#039;s name to &amp;quot;blah&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  end  --End the If loop&lt;br /&gt;
&lt;br /&gt;
end  --End the While loop&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Recursive ==&lt;br /&gt;
&lt;br /&gt;
Recursive sets whether the function should look inside of objects in the calling object, as well as the calling object.&lt;br /&gt;
&lt;br /&gt;
For example, if there is a part in workspace called &amp;quot;Part&amp;quot; and you use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
game:FindFirstChild(&amp;quot;Part&amp;quot;, true)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It will find the part. &lt;br /&gt;
&lt;br /&gt;
[[Category:Functions]]&lt;/div&gt;</summary>
		<author><name>PRG</name></author>
	</entry>
</feed>