Template:Method: Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>Quenty m Removed protection from "Template:Method" |
>JulienDethurens No edit summary |
||
Line 10: | Line 10: | ||
|-style="background: #FFFFFF;" | |-style="background: #FFFFFF;" | ||
|style="width: 10%; border-top: solid 1px black; border-right: solid 1px black; font-weight:bold;"|In Object{{if|{{{object2|}}}|s}}: | |style="width: 10%; border-top: solid 1px black; border-right: solid 1px black; font-weight:bold;"|In Object{{if|{{{object2|}}}|s}}: | ||
|style="border-top: solid 1px black;"|{{if|{{{object|}}}|[[{{{object|}}}]]}}{{if|{{{objects|}}}|{{{objects|}}}}} | |style="border-top: solid 1px black;"|{{if|{{{object|}}}|[[RBX.lua.{{{object|}}} (Object)]]}}{{if|{{{objects|}}}|{{{objects|}}}}} | ||
|}</div><noinclude>{{clear floats}} | |}</div><noinclude>{{clear floats}} | ||
== Example Usage == | == Example Usage == | ||
=== Single Object === | === Single Object === | ||
< | <code> | ||
{{Method | {{Method | ||
|name | |name = FindFirstChild | ||
|arguments | |arguments = [[string]] <var>name</var>, [[bool]] <var>recursive = false</var> | ||
|returns | |returns = [[Instance]] | ||
|description = Returns the first child found with a name of | |description = Returns the first child found with a name of <var>name</var>. Returns [[nil]] if no such child exists. If the optional <var>recursive</var> argument is true, will recursively descend the hierarchy while searching rather than only searching the immediate object. | ||
|object | |object = Instance | ||
}} | }} | ||
</ | </code> | ||
=== Multiple Objects === | === Multiple Objects === | ||
<pre> | <pre> | ||
{{Method | {{Method | ||
|name | |name = BreakJoints | ||
|description = Breaks any | |arguments = | ||
|objects | |description = Breaks any surface connection with any adjacent part, including [[RBX.lua.Weld (Object)|Welds]] and other [[RBX.lua.JointInstance (Object)|JointInstances]]. | ||
|objects = [[RBX.lua.BasePart (Object)|BasePart]], [[RBX.lua.Model (Object)|Model]] | |||
}} | }} | ||
</pre> | </pre> | ||
[[Category:Object Documentation Templates]] | [[Category:Object Documentation Templates]] | ||
</noinclude> | </noinclude> |
Revision as of 03:34, 4 February 2012
[[{{{name}}} (Method)|{{{name}}}]]( {{{arguments}}} ) | |
Returns | {{{returns}}} |
Description: | {{{description}}} |
In Object: |
Example Usage
Single Object
FindFirstChild( string name, bool recursive = false )
Returns
Instance
Description:
Returns the first child found with a name of name. Returns nil if no such child exists. If the optional recursive argument is true, will recursively descend the hierarchy while searching rather than only searching the immediate object.
In Object:
RBX.lua.Instance (Object)
Multiple Objects
{{Method |name = BreakJoints |arguments = |description = Breaks any surface connection with any adjacent part, including [[RBX.lua.Weld (Object)|Welds]] and other [[RBX.lua.JointInstance (Object)|JointInstances]]. |objects = [[RBX.lua.BasePart (Object)|BasePart]], [[RBX.lua.Model (Object)|Model]] }}