ReferenceInstances

gethui

Returns a container for your own interface objects.

Syntax

gethui() -> Folder

Also available as

get_hidden_guiget_hui

Returns

TypeDescription
FolderThe 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

These are Game executor contracts. Check build requirements and session lifetimes before using them.