gethui
Returns the hidden UI container.
Syntax
gethui() -> InstanceReturns
| Type | Description |
|---|---|
Instance | The hidden UI container |
Description
gethui returns a special container for UI that is hidden from game scripts.
Example
local gui = Instance.new("ScreenGui")
gui.Name = "MyHiddenGui"
gui.Parent = gethui()
local frame = Instance.new("Frame")
frame.Size = UDim2.new(0, 200, 0, 100)
frame.Position = UDim2.new(0.5, -100, 0.5, -50)
frame.Parent = guiNotes
- Use for UIs you want to hide from being accessed by a game script
- The container behaves like a normal GUI container