The parent of an object is what it appears under in the Explorer . For example, the parent of most bricks will be ExplorerImageIndex 19Workspace, and the parent of a ExplorerImageIndex 37ForceField might be a BasePart or a ExplorerImageIndex 12Player. You can set the parent of an object to move it around in the hierarchy.

When one object is parented to another object, it is defined as a "Child" of the parent object. When the parent is removed, all child objects go with it, unless you move them to a safe location before or after the removal of the parent. Parents are important.

  • Tree-collapse
    ExplorerImageIndex 19
    • ExplorerImageIndex 65

In the above example, Terrain is a child of workspace. Or you can say that the parent of Terrain is Workspace.

To check if one object is the child or distant child on another object, simply use the IsDescendantOf method:

print(Workspace:IsDescendantOf(game)) --true

To check is one object is the parent or distant parent of another object, simply use the IsAncestorOf method:

print(game:IsAncestorOf(Workspace)) -- true