IsAncestorOf (Method): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Emess
No edit summary
>PurpleKiwi
Added example and fixed spelling error. Remember, it's "DESCENDANT", not "DESCENDENT". Something that is descendent is something that descends. :P
Line 1: Line 1:
<onlyinclude>{{Method|name = IsAncestorOf
<onlyinclude>{{Method|name = IsAncestorOf
|arguments = [[Instance]] '''descendent'''
|arguments = [[Instance]] '''descendant'''
|returns = [[boolean]] ''is ancestor''
|returns = [[boolean]] ''is ancestor''
|description = Returns true if the object is an ancestor of ''descendent''.
|description = Returns true if the object is an ancestor of ''descendant''.
|object = Instance
|object = Instance
}}</onlyinclude>
}}</onlyinclude>
<br><br><br><br><br><br><br><br>
{{Example|<pre>
print(game.Workspace:IsAncestorOf(game.Workspace.Player.Torso)) --> true
</pre>}}
[[Category:Methods]]
[[Category:Methods]]

Revision as of 22:31, 8 July 2011

IsAncestorOf( Instance descendant )
Returns boolean is ancestor
Description: Returns true if the object is an ancestor of descendant.
Member of: Instance









Example
print(game.Workspace:IsAncestorOf(game.Workspace.Player.Torso)) --> true