SurfaceGui
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.

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
Determines whether the SurfaceGui will always be rendered on top of other 3D objects.
Determines the factor by which the SurfaceGui container's light is scaled when LightInfluence is 0.
The size of a "virtual screen" in "virtual pixels" which makes SurfaceGuis pixel-to-pixel compatible with ScreenGuis.
Whether portions of GuiObjects that fall outside of the SurfaceGui canvas borders will be drawn.
Controls how much the SurfaceGui is influenced by environmental lighting.
Controls how far away the SurfaceGui can be displayed before it stops rendering.
Determines the density of pixels used for each world-space stud to render the contents of the SurfaceGui.
Determines whether the SurfaceGui will render at a fixed size or scale with its size in studs.
Sets the distance in which left clicking starts acting on the SurfaceGui instead of for the held Tool.
Layers this SurfaceGui in relation to other SurfaceGuis on the same face.
Properties
BasePart on which to apply the SurfaceGui, overriding the default parent association.
Enum.NormalId face upon which to apply the SurfaceGui.
Properties
Toggles the visibility of this LayerCollector.
Determines if the LayerCollector resets (deletes itself and re-clones into the player's PlayerGui) every time the player's character respawns.
Controls how GuiObject.ZIndex behaves on all descendants of this LayerCollector.
Properties
Describes the actual screen position of a GuiBase2d element, in pixels.
Describes the actual screen rotation of a GuiBase2d element, in degrees.
Describes the actual screen size of a GuiBase2d element, in pixels.
When set to true, localization will be applied to this GuiBase2d and its descendants.
A reference to a LocalizationTable to be used to apply automated localization to this GuiBase2d and its descendants.
Customizes gamepad selection behavior in the down direction.
Customizes gamepad selection behavior in the left direction.
Customizes gamepad selection behavior in the right direction.
Customizes gamepad selection behavior in the up direction.
Allows customization of gamepad selection movement.
Events
Events inherited from GuiBase2dEvents
- SelectionChanged(amISelected : boolean,previousSelection : GuiObject,newSelection : GuiObject):RBXScriptSignal
Fires when the gamepad selection moves to, leaves, or changes within the connected GuiBase2d or any descendant GuiObjects.