Skip to main content

SetParent

Type: function

Sets the parent of a GUI.

When you close a GUI created from Lua, Lua Runtime checks if the parent is set. If not, then it will go back to the title screen. This will error if the parent is not a GUI.

Parameters

ParameterTypeDescription
parentGUIThis will be the parent of this GUI.

Returns

Nothing.

Example

Minecraft.CreateNewGUI("Hello").SetParent(Minecraft.CreateNewGUI("h"))