Roblox Wiki
Roblox Wiki
38,921
pages

Parent is a property of an instance that refers to one other instance as its parent and, in turn, becomes the child of the parent. This allows any child to be indexed from its parent. However, indexing a missing child will error, which is avoided by using the FindFirstChild method to return nil instead. The Parent property is often used in reusable scripts that depend on their parent.

The instances' parent relationships creates a tree-like data structure. If an instance does not have a parent, it is considered as a root. The structure is described by the parent-child-ancestor-descendant terminology used in the Instance API. The property avoids circular references to reinforce this structure.

The DataModel represents the root instance of the structure of a place. This structure is referred to as the hierarchy, which is displayed by the Explorer in Roblox Studio. Models also share the data structure but do not have a root. Instead, any model can have more than one instances.

See also: Parents and Children on the Roblox Creator Documentation.