Skip to content
Roblox API Reference

GuiObject

An abstract class for all 2D user interface objects.
  • Not browsable
  • Not creatable
Memory category
Gui
Own members
63
Inherited members
93
Subclasses
12
Siblings
2

Properties79

Inherited fromObject2

Property categoryData

Inherited fromInstance21

Property categoryBehavior

Property categoryData

Property categoryPermissions

Inherited fromGuiBase2d17

Property categoryData

Property categoryDebugging

Property categoryLocalization

Property categorySelection

Defined byGuiObject39

Property categoryAppearance

  • GuiObject.SelectionImageObject: GuiObject
    Overrides the default selection adornment used for gamepads.
    • Read capabilities: UI

Property categoryBehavior

  • GuiObject.ClipsDescendants: boolean
    Determines if descendant GuiObjects outside of the bounds of a parent GUI element should render.
    • Read capabilities: UI
  • GuiObject.Draggable: boolean
    Deprecated: This property is deprecated. Use UIDragDetector instead, as it supports more input types and can be better customized.
    Determines whether a GuiObject (and its descendants) can be dragged around the screen.
    • Deprecated
    • Read capabilities: UI

Property categoryData

  • GuiObject.Active: boolean
    Determines whether this UI element sinks input.
    • Read capabilities: UI
  • GuiObject.AnchorPoint: Vector2
    Determines the origin point of a GuiObject, relative to its absolute size.
    • Read capabilities: UI
  • GuiObject.AutomaticSize: Enum.AutomaticSize
    Determines whether resizing occurs based on child content.
    • Read capabilities: UI
  • GuiObject.BackgroundColor3: Color3
    Determines the GuiObject background color.
    • Read capabilities: UI
  • GuiObject.BackgroundTransparency: number
    Determines the transparency of the GuiObject background and border.
    • Read capabilities: UI
  • GuiObject.BorderColor3: Color3
    Determines the color of the GuiObject border.
    • Read capabilities: UI
  • GuiObject.BorderMode: Enum.BorderMode
    Determines in what manner the GuiObject border is laid out relative to its dimensions.
    • Read capabilities: UI
  • GuiObject.BorderSizePixel: number
    Determines the pixel width of the GuiObject border.
    • Read capabilities: UI
  • GuiObject.InputSink: Enum.InputSink
    Controls whether, and how, the GuiObject sinks input that occurs over it.
    • Not replicated
    • Read capabilities: UI
  • GuiObject.Interactable: boolean
    Determines whether the GuiButton can be interacted with or not, or if the GuiState of the GuiObject is changing or not.
    • Read capabilities: UI
  • GuiObject.LayoutOrder: number
    Controls the sort order of the GuiObject when used with a UIGridStyleLayout.
    • Read capabilities: UI
  • GuiObject.Position: UDim2
    Determines the pixel and scalar position of the GuiObject.
    • Read capabilities: UI
  • GuiObject.Rotation: number
    Determines the number of degrees by which the GuiObject is rotated.
    • Read capabilities: UI
  • GuiObject.SelectionRect2D: Rect
    • Hidden
    • Read only
    • Roblox script security
    • Thread unsafe
    • Read capabilities: UI
  • GuiObject.Sink: Enum.InputSink
    • Hidden
    • Not scriptable
    • Read: Roblox engine security
    • Read capabilities: UI
  • GuiObject.Size: UDim2
    Determines the pixel and scalar size of the GuiObject.
    • Read capabilities: UI
  • GuiObject.SizeConstraint: Enum.SizeConstraint
    Sets the Size axes that the GuiObject will be based on, relative to the size of its parent.
    • Read capabilities: UI
  • GuiObject.Visible: boolean
    Determines whether the GuiObject and its descendants will be rendered.
    • Read capabilities: UI
  • GuiObject.ZIndex: number
    Determines the order in which a GuiObject renders relative to others.
    • Read capabilities: UI
  • GuiObject.BackgroundColor: BrickColor
    Deprecated: This property is deprecated in favor of the Color3 property GuiObject.BackgroundColor3, which should be used in new work instead.
    Determines the color of the GuiObject background.
    • Deprecated
    • Hidden
    • Not replicated
    • Read capabilities: UI
    • Load only
  • GuiObject.BorderColor: BrickColor
    Deprecated: This property is deprecated in favor of the Color3 property BorderColor3, which should be used in new work instead.
    Determines the color of the GuiObject border.
    • Deprecated
    • Hidden
    • Not replicated
    • Read capabilities: UI
    • Load only
  • GuiObject.Transparency: number
    Deprecated: This property is deprecated and indexing it will return BackgroundTransparency.
    A mixed property of BackgroundTransparency and TextTransparency.
    • Deprecated
    • Hidden
    • Not replicated
    • Read capabilities: UI
    • Load only

Property categoryEventReplicator

  • GuiObject.DragBeginConnectionCount: number
    • Hidden
    • Not scriptable
    • Read capabilities: UI
  • GuiObject.DragStoppedConnectionCount: number
    • Hidden
    • Not scriptable
    • Read capabilities: UI
  • GuiObject.MouseEnterConnectionCount: number
    • Hidden
    • Not scriptable
    • Read capabilities: UI
  • GuiObject.MouseLeaveConnectionCount: number
    • Hidden
    • Not scriptable
    • Read capabilities: UI
  • GuiObject.MouseMovedConnectionCount: number
    • Hidden
    • Not scriptable
    • Read capabilities: UI
  • GuiObject.MouseWheelBackwardConnectionCount: number
    • Hidden
    • Not scriptable
    • Read capabilities: UI
  • GuiObject.MouseWheelForwardConnectionCount: number
    • Hidden
    • Not scriptable
    • Read capabilities: UI

Property categorySelection

  • GuiObject.NextSelectionDown: GuiObject
    Sets the GuiObject which will be selected when the gamepad selector is moved downward.
    • Read capabilities: UI
  • GuiObject.NextSelectionLeft: GuiObject
    Sets the GuiObject which will be selected when the gamepad selector is moved to the left.
    • Read capabilities: UI
  • GuiObject.NextSelectionRight: GuiObject
    Sets the GuiObject which will be selected when the gamepad selector is moved to the right.
    • Read capabilities: UI
  • GuiObject.NextSelectionUp: GuiObject
    Sets the GuiObject which will be selected when the gamepad selector is moved upward.
    • Read capabilities: UI
  • GuiObject.Selectable: boolean
    Determine whether the GuiObject can be selected by a gamepad.
    • Read capabilities: UI
  • GuiObject.SelectionOrder: number
    The order of GuiObjects selected by the gamepad UI selection.
    • Read capabilities: UI

Property categoryState

  • GuiObject.GuiState: Enum.GuiState
    Determines whether the player's mouse is being actively pressed on the GuiObject or not.
    • Read only
    • Read capabilities: UI
    • Save only

Methods48

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
Defined byGuiObject6

Events29

Inherited fromObject1
Inherited fromInstance9
Inherited fromGuiBase2d1
Defined byGuiObject18