Fandom

ROBLOX Wikia

Parent

12,753pages on
this wiki
Add New Page
Comments0 Share

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
    Workspace
    Workspace
    • Terrain
      Terrain

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

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.