API:Class/Instance/IsAncestorOf

IsAncestorOf

Function of Object Icon.pngInstance
bool IsAncestorOf (
    Instance descendant
)
Parameters:
  1. descendant

Returns: bool
Description: Returns true if the object is an ancestor of the given descendant.

Example

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