Skip to content
Roblox API Reference

SurfaceGui

Container for GuiObjects that are rendered on the surface of a part.
Memory category
Instances
Own members
12
Inherited members
102
Subclasses
0
Siblings
2

Properties59

Inherited fromObject2

Property categoryData

Inherited fromInstance21

Property categoryBehavior

Property categoryData

Property categoryPermissions

Inherited fromGuiBase2d17

Property categoryData

Property categoryDebugging

Property categoryLocalization

Property categorySelection

Inherited fromLayerCollector4

Property categoryData

Inherited fromSurfaceGuiBase3

Property categoryData

Defined bySurfaceGui12

Property categoryAppearance

Property categoryBehavior

  • SurfaceGui.ClipsDescendants: boolean = false
    Whether portions of GuiObjects that fall outside of the SurfaceGui canvas borders will be drawn.
    • Read capabilities: UI

Property categoryData

  • SurfaceGui.AlwaysOnTop: boolean = false
    Determines whether the SurfaceGui will always be rendered on top of other 3D objects.
    • Read capabilities: UI
  • SurfaceGui.Brightness: number = 1
    Determines the factor by which the SurfaceGui container's light is scaled when LightInfluence is 0.
    • Read capabilities: UI
  • SurfaceGui.LightInfluence: number = 0
    Controls how much the SurfaceGui is influenced by environmental lighting.
    • Read capabilities: UI
  • SurfaceGui.MaxDistance: number = 0
    Controls how far away the SurfaceGui can be displayed before it stops rendering.
    • Read capabilities: UI
  • SurfaceGui.ToolPunchThroughDistance: number = 0
    Sets the distance in which left clicking starts acting on the SurfaceGui instead of for the held Tool.
    • Read capabilities: UI

Property categorySizing

  • SurfaceGui.CanvasSize: Vector2 = Vector2.new(800, 600)
    The size of a "virtual screen" in "virtual pixels" which makes SurfaceGuis pixel-to-pixel compatible with ScreenGuis.
    • Read capabilities: UI
  • SurfaceGui.PixelsPerStud: number = 50
    Determines the density of pixels used for each world-space stud to render the contents of the SurfaceGui.
    • Read capabilities: UI
  • Determines whether the SurfaceGui will render at a fixed size or scale with its size in studs.
    • Read capabilities: UI

Methods44

Inherited fromObject3
  • Get an event that fires when a given property of the object changes.
    Parameters
    ParameterDescription
    property: string
    The property to connect to.
    Returns
    TypeDescription
    RBXScriptSignal
    A signal that fires whenever the property changes.
  • Object:IsA(className: string): boolean
    Returns true if an object's class matches or inherits from a given class.
    • Custom Lua state
    • Thread safe
    Parameters
    ParameterDescription
    className: string
    The class against which the Object's class will be checked. Case-sensitive.
    Returns
    TypeDescription
    boolean
    Describes whether the Object's class matched or is a subclass of the given class.
  • Object:isA(className: string): boolean
    Deprecated: This deprecated function is a variant of Object:IsA() which should be used instead.
    • Deprecated
    • Custom Lua state
    Parameters
    Parameter
    className: string
    Returns
    Type
    boolean

    Use IsA instead.

Inherited fromInstance39
Inherited fromLayerCollector2

Events11

Inherited fromObject1
Inherited fromInstance9
Inherited fromGuiBase2d1