The GuiObject class inherits from GuiBase2d. It is a structural class to which all the properties and methods that are common to all GUI classes belong. These classes include Frame, GuiButton, GuiLabel, ImageButton, and ImageLabel.
Properties
Active: bool
- Category: Data.
- Serialization: can save and load.
- Thread safety: read safe
AnchorPoint: Vector2
- Category: Data.
- Serialization: can save and load.
- Thread safety: read safe
AutomaticSize: AutomaticSize
- Category: Data.
- Serialization: can save and load.
- Thread safety: read safe
BackgroundColor3: Color3
- Category: Data.
- Serialization: can save and load.
- Thread safety: read safe
BackgroundTransparency: float
The background transparency of the GuiObject.
- Category: Data.
- Serialization: can save and load.
- Thread safety: read safe
BorderColor3: Color3
Indicates the color of the border surrounding the GUI object. This value will be overridden by UIStroke objects.
- Category: Data.
- Serialization: can save and load.
- Thread safety: read safe
BorderMode: BorderMode
- Category: Data.
- Serialization: can save and load.
- Thread safety: read safe
BorderSizePixel: int
Indicates the thickness of the GUI object's border.
- Category: Data.
- Serialization: can save and load.
- Thread safety: read safe
ClipsDescendants: bool
- Category: Behavior.
- Serialization: can save and load.
- Thread safety: read safe
Interactable: bool
Indicates whether or not this object and its descendants can be interacted with.
- Category: Data.
- Serialization: can save and load.
- Thread safety: read safe
LayoutOrder: int
- Category: Data.
- Serialization: can save and load.
- Thread safety: read safe
NextSelectionDown: GuiObject
- Category: Selection.
- Serialization: can save and load.
- Thread safety: read safe
NextSelectionLeft: GuiObject
- Category: Selection.
- Serialization: can save and load.
- Thread safety: read safe
NextSelectionRight: GuiObject
- Category: Selection.
- Serialization: can save and load.
- Thread safety: read safe
NextSelectionUp: GuiObject
- Category: Selection.
- Serialization: can save and load.
- Thread safety: read safe
Rotation: float
Indicates the degrees of rotation to apply to this GuiObject, from 0 to 360.
- Category: Data.
- Serialization: can save and load.
- Thread safety: read safe
Selectable: bool
- Category: Selection.
- Serialization: can save and load.
- Thread safety: read safe
SelectionImageObject: GuiObject
- Category: Appearance.
- Serialization: can save and load.
- Thread safety: read safe
SelectionOrder: int
- Category: Selection.
- Serialization: can save and load.
- Thread safety: read safe
SizeConstraint: SizeConstraint
- Category: Data.
- Serialization: can save and load.
- Thread safety: read safe
Visible: bool
Indicates whether or not the GUI object can be seen and interacted with by the client.
- Category: Data.
- Serialization: can save and load.
- Thread safety: read safe
ZIndex: int
- Category: Data.
- Serialization: can save and load.
- Thread safety: read safe
Methods
TweenPosition(endPosition: UDim2, easingDirection: EasingDirection = Out, easingStyle: EasingStyle = Quad, time: float = 1, override: bool = false, callback: Function = nil): bool
Name | Type | Default |
---|---|---|
endPosition | UDim2 | |
easingDirection | EasingDirection | Out |
easingStyle | EasingStyle | Quad |
time | float | 1 |
override | bool | false |
callback | Function | nil |
- Thread safety: unsafe
TweenSize(endSize: UDim2, easingDirection: EasingDirection = Out, easingStyle: EasingStyle = Quad, time: float = 1, override: bool = false, callback: Function = nil): bool
Name | Type | Default |
---|---|---|
endSize | UDim2 | |
easingDirection | EasingDirection | Out |
easingStyle | EasingStyle | Quad |
time | float | 1 |
override | bool | false |
callback | Function | nil |
- Thread safety: unsafe
TweenSizeAndPosition(endSize: UDim2, endPosition: UDim2, easingDirection: EasingDirection = Out, easingStyle: EasingStyle = Quad, time: float = 1, override: bool = false, callback: Function = nil): bool
Name | Type | Default |
---|---|---|
endSize | UDim2 | |
endPosition | UDim2 | |
easingDirection | EasingDirection | Out |
easingStyle | EasingStyle | Quad |
time | float | 1 |
override | bool | false |
callback | Function | nil |
- Thread safety: unsafe
Events
SelectionGained()
- Thread safety: unsafe
SelectionLost()
- Thread safety: unsafe
TouchLongPress(touchPositions: Array, state: UserInputState)
Name | Type |
---|---|
touchPositions | Array |
state | UserInputState |
- Thread safety: unsafe
TouchPan(touchPositions: Array, totalTranslation: Vector2, velocity: Vector2, state: UserInputState)
Name | Type |
---|---|
touchPositions | Array |
totalTranslation | Vector2 |
velocity | Vector2 |
state | UserInputState |
- Thread safety: unsafe
TouchPinch(touchPositions: Array, scale: float, velocity: float, state: UserInputState)
Name | Type |
---|---|
touchPositions | Array |
scale | float |
velocity | float |
state | UserInputState |
- Thread safety: unsafe
TouchRotate(touchPositions: Array, rotation: float, velocity: float, state: UserInputState)
Name | Type |
---|---|
touchPositions | Array |
rotation | float |
velocity | float |
state | UserInputState |
- Thread safety: unsafe
TouchSwipe(swipeDirection: SwipeDirection, numberOfTouches: int)
Name | Type |
---|---|
swipeDirection | SwipeDirection |
numberOfTouches | int |
- Thread safety: unsafe
Removed members
Properties
External links[]
- GuiObject in the Roblox Creator Documentation
- GuiObject in the Roblox API Reference