gethui
Returns a container for your own interface objects.
Syntax
gethui() -> Folder
Also available as
get_hidden_guiget_hui
Returns
| Type | Description |
|---|---|
Folder | The joined game's cached UI container under CoreGui. |
Description
Parent your ScreenGuis here instead of to PlayerGui. Every call returns the same container; if it is removed, the next call creates a new one. ScreenGuis inside the container participate in the engine's normal UI rendering.
Example
local gui = Instance.new("ScreenGui")
gui.Name = "Tools"
gui.Parent = gethui()
local label = Instance.new("TextLabel")
label.Size = UDim2.fromOffset(200, 40)
label.Text = "Hello"
label.Parent = gui
Notes
- Supported profiles keep bulk ContentProvider:PreloadAsync scans from entering this owned UI subtree. Explicit preloads of the container, its children or image IDs still use normal engine loading. This is not a guarantee of isolation from every game service; code holding a direct reference can still explicitly request those assets.
These are Game executor contracts. Check build requirements and session lifetimes before using them.
