# SurfaceGui

SurfaceGui : `SurfaceGuiBase`

## Overview

SurfaceGui is a UI container used to make the 2D UI elements (GuiObject) placed in 3D space face the camera at all times. The position of this container is determined by the connected BasePart or a specified Adornee.

In addition, SurfaceGui internally caches rendering results and reuse them when there are no changes to optimize performance. However, if the properties of SurfaceGui 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.

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

## Properties

### Face

`Enum.NormalId`

Specifies on which side of rendering object SurfaceGui should be displayed.

#### Code Samples

```lua
local SurfaceGui = script.Parent

SurfaceGui.Face = Enum.NormalId.Top
```

### ZOffset

`number`

Specifies the overlapping order of SurfaceGuis placed on the same side.

#### Code Samples

```lua
local SurfaceGui = script.Parent

SurfaceGui.ZOffset = 2
```

## Methods

## Events

## See also

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


---

# Agent Instructions: 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/surfacegui.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.
