Open Asterune
ScreenGui

ScreenGui

Contains a screen-space interface for one player.

Creatable
Instance.new("ScreenGui")
Inherits
GuiLayerCollectorGuiBase2dGuiBaseInstance
Replication
Standard

Behavior

ScreenGui contains GUI instances rendered for one player. Parent it to that player's PlayerGui. Templates in StarterGui are copied into PlayerGui on spawn.

Summary

Members5
Properties4
  • DisplayOrder: number = 0parallel read

    The draw order of this ScreenGui relative to other interface roots.

  • Enabled: boolean = trueparallel read

    Whether the screen and its descendants are rendered.

  • IgnoreGuiInset: boolean = falseparallel read

    Whether layout ignores screen space reserved by the engine interface.

  • ResetOnSpawn: boolean = trueparallel read

    Whether the screen is deleted and recreated on respawn.

Methods1

Properties

DisplayOrder

ScreenGui.DisplayOrder: number = 0

The draw order of this ScreenGui relative to other interface roots.

Enabled

ScreenGui.Enabled: boolean = true

Whether the screen and its descendants are rendered.

IgnoreGuiInset

ScreenGui.IgnoreGuiInset: boolean = false

Whether layout ignores screen space reserved by the engine interface.

ResetOnSpawn

ScreenGui.ResetOnSpawn: boolean = true

Whether the screen is deleted and recreated on respawn. Set to false to preserve the screen. References to a replaced screen must be reacquired.

Methods

GetExecutionGroup

ScreenGui:GetExecutionGroup(): ExecutionGroup?

Returns this instance if it is an ExecutionGroup. Otherwise returns the nearest ancestor ExecutionGroup, or nil when no group contains the instance.

Inherited members

Inherited47

Example

Luau
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local screen = Instance.new("ScreenGui")
screen.ResetOnSpawn = false
screen.Parent = player:WaitForChild("PlayerGui")

Frame · TextLabel · StarterGui · PlayerGui