Parent (Property): Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>Camoy No edit summary |
>XLEGOx No edit summary |
||
Line 2: | Line 2: | ||
|name = Parent | |name = Parent | ||
|property = [[Instance|Object]] ''An object's parent'' | |property = [[Instance|Object]] ''An object's parent'' | ||
|description = The hierarchical parent of the | |description = The hierarchical parent of the object. When no scripts hold references to an object, it will still be maintained as long as it's parent is set to an object which does have references to it, either by other objects or scripts. The toplevel {{DataModel}} object (the one referred to as the "game" by scripts) has no parent, but always has a reference held to it by the game engine, and exists for the duration of a session. | ||
|object = Instance | |object = Instance | ||
}}</onlyinclude> | }}</onlyinclude> |
Revision as of 02:31, 4 June 2011
Parent | |
Property | Object An object's parent |
Description | The hierarchical parent of the object. When no scripts hold references to an object, it will still be maintained as long as it's parent is set to an object which does have references to it, either by other objects or scripts. The toplevel Template:DataModel object (the one referred to as the "game" by scripts) has no parent, but always has a reference held to it by the game engine, and exists for the duration of a session. |
Member of | Instance |
Example
print(script.Parent.Name) -- "Workspace" should appear in the output window (only if the script is located under Workspace).