Skip to content

LayerCollector

Supported Class Other NotBrowsable NotCreatable

The base class of 2D UI containers which render GuiObjects in layers.

3 Nova members · 2 modern Roblox members not implemented yet

Description

LayerCollector is the base class of 2D UI containers which render GuiObject descendants, such as ScreenGui.

For performance improvements, the appearance of a LayerCollector is cached until one of the following events occurs:

  • A descendant is added to or removed from it.
  • A property of a descendant changes.
  • A property of the LayerCollector itself changes.

Inheritance

Object → Instance → GuiBase → GuiBase2d → LayerCollector

Nova inheritance: Instance → GuiBase → GuiBase2d → LayerCollector

Known subclasses: BillboardGui, PluginGui, ScreenGui, SurfaceGui, SurfaceGuiBase

Properties

Enabled Supported Property Toggles the visibility of this LayerCollector.
Enabled: bool

Toggles the visibility of this LayerCollector. When false, the UI contents will not render, process user input, or update in response to changes.

Roblox documentation

ResetOnSpawn Supported Property Determines if the LayerCollector resets (deletes itself and re-clones into the player's PlayerGui) every time the player's character respawns.
ResetOnSpawn: bool

Determines if the LayerCollector resets (deletes itself and re-clones into the player's PlayerGui) every time the player's character respawns.

When set to false and this LayerCollector is a direct child of StarterGui, it will only be cloned into each player's PlayerGui once and it will not be deleted when the player's character respawns.

When set to true (default), or if this LayerCollector is an indirect descendant of StarterGui, it will be cloned into each player's PlayerGui when their character respawns, and it will delete itself when the player's character respawns again.

Roblox documentation

ZIndexBehavior Supported Property Controls how GuiObject.ZIndex behaves on all descendants of this LayerCollector.
ZIndexBehavior: ZIndexBehavior

Controls how GuiObject.ZIndex behaves on all descendants of this LayerCollector.

With ZIndexBehavior.Sibling (default), children always render above their parents, and the ZIndex is used to decide the order in which children of a single UI object will render over each other.

ZIndexBehavior.Global sorts all descendants according to the ZIndex, then breaks ties using the hierarchy order. As a result, descendants of a GuiObject need to have a ZIndex value that's at least as high as the parent, or they will render underneath their parent.

Roblox documentation

Inherited members

Inherited from GuiBase2d: 17 properties, 36 methods, 7 events. They are documented on the base class page.

2 modern Roblox member(s) are not implemented yet — expand to inspect

Members declared by Roblox's LayerCollector class (or by a missing base class) that Nova does not expose. Use this list to scope a migration; the compatibility guide has the recommended workaround.

Methods

Member Signature Status Notes Flags
GetGuiObjectsAtPosition LayerCollector:GetGuiObjectsAtPosition(x: int, y: int): Instances Not yet — RobloxScriptSecurity
GetLayoutNodeTree LayerCollector:GetLayoutNodeTree(): Dictionary Not yet — —

Roblox reference: LayerCollector

Generated from Nova's API dump and Roblox creator-docs. Nova-only members come from the engine's reflection metadata.