> 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 %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.overdare.com/development/api-reference/classes/screengui.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
