SurfaceGui

Show Deprecated

SurfaceGui allows for the rendering of UI objects onto a part's surface in the 3D world while also allowing for basic user interaction to occur. Similar to Decals and Textures, UI objects such as TextLabels and ImageLabels parented to a SurfaceGui face the same direction as the surface they're on, editable through the Face property.

SurfaceGui on a 3D part in the place with an ImageLabel child to depict a screen console.

Note that interactive UI elements like ImageButtons and TextButtons inside a SurfaceGui will only receive user input if they are parented to the PlayerGui, typically via placing the SurfaceGui inside StarterGui (the Adornee property can be used to target a part in the 3D world while the SurfaceGui itself remains in the PlayerGui). Additionally, the part's CanQuery property must be true for the interactive UI element to receive input.

See In-Experience UI for a guide on working with SurfaceGui containers.

Caching Behavior

To help improve performance, the appearance of a SurfaceGui is cached until one of the following occurs, after which its appearance will be recomputed on the next rendering frame.

  • A descendant is added to or removed from the SurfaceGui.
  • A property of a descendant of the SurfaceGui changes.
  • A property of the SurfaceGui itself changes.

Summary

Properties

Properties inherited from SurfaceGuiBase

Properties

Properties inherited from LayerCollector

Properties

Properties inherited from GuiBase2d

Properties

Events

Events inherited from GuiBase2d

Events

Properties

AlwaysOnTop

Read Parallel

Brightness

Read Parallel

CanvasSize

Read Parallel

ClipsDescendants

Read Parallel

LightInfluence

Read Parallel

MaxDistance

Read Parallel

PixelsPerStud

Read Parallel
Read Parallel

ToolPunchThroughDistance

Read Parallel

ZOffset

Read Parallel

Methods

Events