> For the complete documentation index, see [llms.txt](https://docs.overdare.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.overdare.com/development/api-reference/classes/screengui.md).

# ScreenGui

ScreenGui : `LayerCollector`

## Overview

ScreenGui is a container holding 2D UI elements (GuiObject) displayed on user screen. For these elements to be actually displayed, ScreenGui must be placed in player’s PlayerGui. If it is placed in StarterGui, it is automatically replicated to each player’s PlayerGui when a player enters the game and a character is created for the first time.

ScreenGui may contain a variety of child UI elements such as Frame, TextLabel, and ImageButton.

In addition, ScreenGui internally caches rendering results and reuse them when there are no changes to optimize performance. However, if the properties of ScreenGui itself are changed, the properties of child elements are changed, or child elements are added or removed, the screen information is recalculated in the next rendering frame.

ScreenGui **can be controlled only in client environment**.

## Properties

### DisplayOrder

`number`

Defines the overlapping order when multiple ScreenGuis are simultaneously displayed on screen. A ScreenGui with a higher DisplayOrder value is placed forward than a ScreenGui with a lower DisplayOrder, so it can visually form a more forward layer.

You can enter an integer value between 0 and 999,999,999. The default value is 0. Higher values are displayed above ScreenGuis with lower values.

#### Code Samples

```lua
local ScreenGui = script.Parent

ScreenGui.DisplayOrder = 2
```

## Methods

## Events

## See aslo

{% content-ref url="/pages/Hgp8bh8C44modKPwUBkg" %}
[GUI](/manual/studio-manual/gui.md)
{% endcontent-ref %}
