# SurfaceGui

Roblox Engine API class from Roblox Studio 0.744.0.7441077 (version-7aaa6838d36c4448).

- Inherits from, nearest first: [SurfaceGuiBase](https://rapi.sleaze.dev/classes/SurfaceGuiBase.md), [LayerCollector](https://rapi.sleaze.dev/classes/LayerCollector.md), [GuiBase2d](https://rapi.sleaze.dev/classes/GuiBase2d.md), [GuiBase](https://rapi.sleaze.dev/classes/GuiBase.md), [Instance](https://rapi.sleaze.dev/classes/Instance.md), [Object](https://rapi.sleaze.dev/classes/Object.md)
- Memory category: Instances
- HTML page: https://rapi.sleaze.dev/classes/SurfaceGui/
- Roblox documentation: https://create.roblox.com/docs/reference/engine/classes/SurfaceGui

Container for GuiObjects that are rendered on the surface of a part.

## Properties

### HorizontalCurvature

```luau
SurfaceGui.HorizontalCurvature: number = 0
```

- Tags: Hidden, Roblox script security, Read capabilities: UI

### Shape

```luau
SurfaceGui.Shape: Enum.SurfaceGuiShape = Enum.SurfaceGuiShape.Flat
```

- Tags: Hidden, Roblox script security, Read capabilities: UI

### ZOffset

```luau
SurfaceGui.ZOffset: number = 0
```

- Tags: Read capabilities: UI

Layers this [`SurfaceGui`](https://rapi.sleaze.dev/classes/SurfaceGui.md) in relation to other `SurfaceGuis` on the same face.

### ClipsDescendants

```luau
SurfaceGui.ClipsDescendants: boolean = false
```

- Tags: Read capabilities: UI

Whether portions of `GuiObjects` that fall outside of the [`SurfaceGui`](https://rapi.sleaze.dev/classes/SurfaceGui.md) canvas borders will be drawn.

### AlwaysOnTop

```luau
SurfaceGui.AlwaysOnTop: boolean = false
```

- Tags: Read capabilities: UI

Determines whether the [`SurfaceGui`](https://rapi.sleaze.dev/classes/SurfaceGui.md) will always be rendered on top of other 3D objects.

### Brightness

```luau
SurfaceGui.Brightness: number = 1
```

- Tags: Read capabilities: UI

Determines the factor by which the [`SurfaceGui`](https://rapi.sleaze.dev/classes/SurfaceGui.md) container's light is scaled when [`LightInfluence`](https://rapi.sleaze.dev/classes/SurfaceGui.md) is `0`.

### LightInfluence

```luau
SurfaceGui.LightInfluence: number = 0
```

- Tags: Read capabilities: UI

Controls how much the [`SurfaceGui`](https://rapi.sleaze.dev/classes/SurfaceGui.md) is influenced by environmental lighting.

### MaxDistance

```luau
SurfaceGui.MaxDistance: number = 0
```

- Tags: Read capabilities: UI

Controls how far away the [`SurfaceGui`](https://rapi.sleaze.dev/classes/SurfaceGui.md) can be displayed before it stops rendering.

### ToolPunchThroughDistance

```luau
SurfaceGui.ToolPunchThroughDistance: number = 0
```

- Tags: Read capabilities: UI

Sets the distance in which left clicking starts acting on the [`SurfaceGui`](https://rapi.sleaze.dev/classes/SurfaceGui.md) instead of for the held [`Tool`](https://rapi.sleaze.dev/classes/Tool.md).

### CanvasSize

```luau
SurfaceGui.CanvasSize: Vector2 = Vector2.new(800, 600)
```

- Tags: Read capabilities: UI

The size of a "virtual screen" in "virtual pixels" which makes `SurfaceGuis` pixel-to-pixel compatible with `ScreenGuis`.

### PixelsPerStud

```luau
SurfaceGui.PixelsPerStud: number = 50
```

- Tags: Read capabilities: UI

Determines the density of pixels used for each world-space stud to render the contents of the [`SurfaceGui`](https://rapi.sleaze.dev/classes/SurfaceGui.md).

### SizingMode

```luau
SurfaceGui.SizingMode: Enum.SurfaceGuiSizingMode = Enum.SurfaceGuiSizingMode.FixedSize
```

- Tags: Read capabilities: UI

Determines whether the [`SurfaceGui`](https://rapi.sleaze.dev/classes/SurfaceGui.md) will render at a fixed size or scale with its size in studs.

## Inherited members

- From [SurfaceGuiBase](https://rapi.sleaze.dev/classes/SurfaceGuiBase.md): `Active`, `Adornee`, `Face`
- From [LayerCollector](https://rapi.sleaze.dev/classes/LayerCollector.md): `Enabled`, `ResetOnSpawn`, `TabKeyboardNavigation`, `ZIndexBehavior`, `GetGuiObjectsAtPosition`, `GetLayoutNodeTree`
- From [GuiBase2d](https://rapi.sleaze.dev/classes/GuiBase2d.md): `AbsolutePosition`, `AbsoluteRotation`, `AbsoluteSize`, `ActiveQueryNames`, `ReplicatedInsertionOrder`, `ClippedRect`, `IsNotOccluded`, `RawRect2D`, `TotalGroupScale`, `AutoLocalize`, `RootLocalizationTable`, `Localize`, `SelectionBehaviorDown`, `SelectionBehaviorLeft`, `SelectionBehaviorRight`, `SelectionBehaviorUp`, `SelectionGroup`, `SelectionChanged`
- From [Instance](https://rapi.sleaze.dev/classes/Instance.md): `Archivable`, `archivable`, `Attributes`, `AttributesReplicate`, `AttributesSerialize`, `HistoryId`, `Name`, `Parent`, `PredictionMode`, `PropertyStatusStudio`, `RobloxLocked`, `SerializedOverrides`, `SourceAssetId`, `Tags`, `UniqueId`, `numExpectedDirectChildren`, `DataCost`, `Capabilities`, `DefinesCapabilities`, `IsInSandbox`, `Sandboxed`, `AddTag`, `ClearAllChildren`, `Clone`, `Destroy`, `FindFirstAncestor`, `FindFirstAncestorOfClass`, `FindFirstAncestorWhichIsA`, `FindFirstChild`, `FindFirstChildOfClass`, `FindFirstChildWhichIsA`, `FindFirstDescendant`, `GetActor`, `GetAttribute`, `GetAttributeChangedSignal`, `GetAttributes`, `GetChildren`, `GetDebugId`, `GetDescendants`, `GetFullName`, `GetStyled`, `GetStyledPropertyChangedSignal`, `GetTags`, `HasTag`, `IsAncestorOf`, `IsDescendantOf`, `IsPropertyModified`, `QueryDescendants`, `RemoveTag`, `ResetPropertyToDefault`, `SetAttribute`, `WaitForChild`, `Remove`, `children`, `clone`, `destroy`, `findFirstChild`, `getChildren`, `isDescendantOf`, `remove`, `AncestryChanged`, `AttributeChanged`, `ChildAdded`, `ChildRemoved`, `DescendantAdded`, `DescendantRemoving`, `Destroying`, `StyledPropertiesChanged`, `childAdded`
- From [Object](https://rapi.sleaze.dev/classes/Object.md): `ClassName`, `className`, `GetPropertyChangedSignal`, `IsA`, `isA`, `Changed`
