Glorpia Docs
Instances

SurfaceGui

A GUI container rendered onto a selected face of a Part or SpawnLocation.

Properties

NameTypeDescription
EnabledbooleanControls whether the SurfaceGui renders and receives GUI input. Default: true.
AlwaysOnTopbooleanWhen true, draws above world geometry. Default: false.
AbsoluteSizeVector2Read-only logical pixel size derived from the selected part face and PixelsPerStud.
FaceEnum.NormalIdPart face used by the GUI. Default: Enum.NormalId.Front.
PixelsPerStudnumberRender density in logical pixels per stud on the selected face. Default: 100.
MaxDistancenumberMaximum camera distance at which the GUI renders. Default: 1000.

Hierarchy and rendering

A SurfaceGui is active when directly parented to a Part or SpawnLocation in Workspace. It follows that part's transform and selected face.

AbsoluteSize is calculated from the selected face dimensions multiplied by PixelsPerStud. SurfaceGui has no authored CanvasSize. A density of 100 PixelsPerStud is the authored pixel baseline. Increasing PixelsPerStud raises render density while fixed pixel offsets, border widths, corner offsets and non-scaled TextSize retain the same physical size on the part. TextScaled also uses the higher-density canvas instead of shrinking at high PixelsPerStud values. Frame, TextLabel and TextButton visuals use the shared Skia 2D renderer; the finished layers are perspective-correctly sampled on angled part faces. UIBlur can blur the local 3D backdrop behind a child GUI object while the foreground remains sharp. TextButton pointer signals use the same density-aware projected layout for hit testing.

Hierarchy parenting is unrestricted. A SurfaceGui in another context stays in the hierarchy but does not render. With AlwaysOnTop = false, it participates in 3D BlurEffect/ColourCorrection; with AlwaysOnTop = true, it is composited afterward and bypasses those effects while remaining below ScreenGui.

Example

Luau
local gui = Instance.new("SurfaceGui")
gui.Face = Enum.NormalId.Front
gui.PixelsPerStud = 100
print(gui.AbsoluteSize)
gui.MaxDistance = 150
gui.Parent = workspace.Sign

local label = Instance.new("TextLabel")
label.Size = UDim2.new(1, 0, 1, 0)
label.TextScaled = true
label.Text = "Glorpia"
label.Parent = gui

Related