Frame

Frame : GuiObject

Overview

The Frame class is a type of GuiObject, which means it inherits properties and behaviors common to all GUI objects.

Description

The Frameis a versatile GUI element that acts as a container for other GUI objects. It is primarily used to organize and manage the layout of user interface components. Frames can be displayed on a user's screen or on surfaces within the game environment, making them essential for creating structured and interactive UIs.

Properties

BorderPixelSize

number

The BorderPixelSize property determines the thickness of the border around the Frame, measured in pixels. A value of 0 means the border will not be visible. This property allows developers to emphasize or de-emphasize the edges of the Frame as needed for their UI design.

Code Samples

local ScreenGui = script.Parent
local Frame = ScreenGui.Frame

print(Frame.BorderPixelSize)

BorderMode

Enum.BorderMode

The BorderMode property specifies the appearance of the Frame's border. It determines how the border is rendered around the Frame. By altering this property, developers can achieve different visual styles for the border, such as inset, outset, or default settings.

Possible values for BorderMode include:

  1. Outline - A standard border that outlines the Frame.

  2. Inset - A border that appears inset, giving a recessed effect.

  3. Middle- A border that appears equally distributed on both the inside and outside of the Frame, creating a balanced look.

This allows for a wide range of visual customizations depending on the desired style of the user interface element.

Code Samples

local ScreenGui = script.Parent
local Frame = ScreenGui.Frame

print(Frame.BorderMode)

BorderColor3

Color3

The BorderColor3 property specifies the color of the Frame's border using the Color3 data type. This property allows developers to customize the border's appearance to align with the desired color theme or design aesthetics of the user interface.

The color is defined using RGB (Red, Green, Blue) values, providing flexibility to achieve a wide range of colors to suit the application's needs.

Code Samples

//NotWork//

Methods

Events