Open Asterune
Frame

Frame

Displays a rectangle and contains GUI instances.

Creatable
Instance.new("Frame")
Inherits
GuiObjectGuiBase2dGuiBaseInstance
Replication
Standard

Behavior

Frame provides a background rectangle and a container for GUI children. Size and Position use UDim2 values to combine parent-relative scale with pixel offsets.

Summary

Members50
Properties35
Methods3
Events12

Properties

AbsolutePosition

Frame.AbsolutePosition: Vector2 = Vector2.new(0, 0)

The resolved position in pixels from the top-left of the screen.

AbsoluteRotation

Frame.AbsoluteRotation: number = 0

The resolved rotation of this interface element in degrees, including ancestor rotation.

AbsoluteSize

Frame.AbsoluteSize: Vector2 = Vector2.new(0, 0)

The read-only resolved dimensions in pixels.

Active

Frame.Active: boolean = false

Whether the frame consumes input instead of passing it to GUI instances behind it.

AnchorPoint

Frame.AnchorPoint: Vector2 = Vector2.new(0, 0)

The point within the frame used by Position. (0, 0) is the top-left corner and is the default. (0.5, 0.5) is the center; (1, 1) is the bottom-right corner.

AutomaticSize

The dimensions that resize to fit the element's content.

BackgroundColor3

Frame.BackgroundColor3: Color3 = Color3.new(0.6392157, 0.63529414, 0.64705884)

The background fill color.

BackgroundTransparency

Frame.BackgroundTransparency: number = 0

The background transparency, from 0 (opaque) to 1 (invisible). This does not change child transparency.

BorderColor3

Frame.BorderColor3: Color3 = Color3.new(0.105882354, 0.16470589, 0.20784314)

The color of the element's border.

BorderMode

Whether the border is drawn outside, across, or inside the element's bounds.

BorderSizePixel

Frame.BorderSizePixel: number = 1

The border width in pixels. Set to 0 to hide the border.

ClipsDescendants

Frame.ClipsDescendants: boolean = false

Whether child rendering is clipped at the frame boundaries.

CornerRadius

Frame.CornerRadius: number = 0

The corner radius used for the element's rounded background.

Corners

Frame.Corners: { number } = {}

The individual corner radii used for the element's rounded background.

Draggable

Frame.Draggable: boolean = false

Whether pointer dragging can move the element.

Grow

Frame.Grow: number = 0

The share of remaining main-axis space assigned to this child in flow layout.

GuiState

The element's current idle, hover, pressed, or non-interactable state.

InputSink

Which input events this element consumes before they reach elements behind it.

Interactable

Frame.Interactable: boolean = true

Whether the element accepts interaction.

Layout

Whether children use flow layout or their explicit positions.

LayoutOrder

Frame.LayoutOrder: number = 0

The ordering value used by a parent layout such as UIListLayout or UIGridLayout.

NextSelectionDown

Frame.NextSelectionDown: GuiObject? = nil

The interface element selected when navigating down from this element.

NextSelectionLeft

Frame.NextSelectionLeft: GuiObject? = nil

The interface element selected when navigating left from this element.

NextSelectionRight

Frame.NextSelectionRight: GuiObject? = nil

The interface element selected when navigating right from this element.

NextSelectionUp

Frame.NextSelectionUp: GuiObject? = nil

The interface element selected when navigating up from this element.

Opacity

Frame.Opacity: number = 1

The opacity multiplier applied to this element and its descendants.

Position

Frame.Position: UDim2 = UDim2.new(0, 0, 0, 0)

The position relative to the parent, measured at AnchorPoint.

Rotation

Frame.Rotation: number = 0

The interface rotation in degrees.

Selectable

Frame.Selectable: boolean = false

Whether interface navigation can select this element.

SelectionImageObject

Frame.SelectionImageObject: GuiObject? = nil

The interface element used to draw the selection indicator.

SelectionOrder

Frame.SelectionOrder: number = 0

The numeric order used for interface selection traversal.

Size

Frame.Size: UDim2 = UDim2.new(0, 0, 0, 0)

The frame dimensions as a UDim2. Scale is relative to the parent; offset is added in pixels.

SizeConstraint

The parent axes used to resolve relative interface size.

Visible

Frame.Visible: boolean = true

Whether the frame and its descendants are rendered. Hidden GUI instances do not receive input.

ZIndex

Frame.ZIndex: number = 1

The rendering order among siblings. Higher values render in front.

Methods

CaptureFocus

Frame:CaptureFocus(): ()

Gives keyboard focus to this interface element.

GetExecutionGroup

Frame:GetExecutionGroup(): ExecutionGroup?

Returns this instance if it is an ExecutionGroup. Otherwise returns the nearest ancestor ExecutionGroup, or nil when no group contains the instance.

ReleaseFocus

Frame:ReleaseFocus(): ()

Removes keyboard focus from this interface element.

Events

DragBegin

Frame.DragBegin: RBXScriptSignal

Fires when pointer dragging of the element begins.

DragStopped

Frame.DragStopped: RBXScriptSignal

Fires when pointer dragging of the element ends.

InputBegan

Frame.InputBegan: RBXScriptSignal

Fires when input begins over the frame.

InputChanged

Frame.InputChanged: RBXScriptSignal

Fires when input dispatched to this element changes.

InputEnded

Frame.InputEnded: RBXScriptSignal

Fires when input dispatched to this element ends.

MouseWheelBackward

Frame.MouseWheelBackward: RBXScriptSignal

Fires when the mouse wheel scrolls backward over this element.

MouseWheelForward

Frame.MouseWheelForward: RBXScriptSignal

Fires when the mouse wheel scrolls forward over this element.

PointerEntered

Frame.PointerEntered: RBXScriptSignal

Fires when the pointer enters the frame.

PointerExited

Frame.PointerExited: RBXScriptSignal

Fires when the pointer leaves the frame.

PointerMoved

Frame.PointerMoved: RBXScriptSignal

Fires when the pointer moves across the object.

SelectionGained

Frame.SelectionGained: RBXScriptSignal

Fires when interface navigation selects this element.

SelectionLost

Frame.SelectionLost: RBXScriptSignal

Fires when this element loses interface selection.

Inherited members

Inherited48

Example

Luau
local frame = Instance.new("Frame")
frame.Size = UDim2.new(0.5, 0, 0, 80)
frame.BackgroundTransparency = 1

TextLabel · TextButton · ScreenGui · UDim2