PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

IsAncestorOf

Returns true if an Instance is an ancestor of the given descendant.

An Instance is considered the ancestor of an object if the object’s Instance/Parent or one of it’s parent’s Instance/Parent is set to the Instance.

See also, Instance/IsDescendantOf.

Parameters

Name Type Default Description

The descendant Instance.

Returns

Return Type Summary

True if the Instance is an ancestor of the given descendant.


Code Samples


Instance:IsAncestorOf

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