Frame2D

Panels, buttons and boxes for your overlays. It's a rounded rectangle in any colour, ready for an outline, a shadow or a glow.

A low granite plinth on a paved patio before a sunlit cream plaster wall, blue sky above, mid afternoon sun from the front left; four Parts stand on the plinth, a blue block, a red ball, a yellow cylinder and a green wedge.
Before
The same frame with a Frame2D, so a dark rounded panel lies over the lower left corner.
After

After: A Frame2D 560 by 230 pixels with Corner Radius 28 and Transparency 0.25.

A Frame2D is a filled rounded rectangle drawn on top of its DataModel's image. Color and Transparency set its fill, CornerRadius rounds its corners in pixels, and Position, AnchorPoint, Size and Scale place it. A higher ZIndex draws on top. A Stroke under it outlines it and a DropShadow shadows it. Like Roblox's ScrollingFrame and CanvasGroup, it can clip what is inside it (Clips), scroll a larger canvas (Canvas, Scroll, ScrollBar) and fade its whole contents as one (Group).

Properties

Scripts

NameTypeDefaultDescription
BackgroundColor3Color3scripts onlyRoblox's name for Color, which Luau takes as an alias.
BackgroundTransparencynumberscripts onlyRoblox's name for Transparency, which Luau takes as an alias.
CanvasPositionVector2scripts onlyRoblox's name for Scroll, a Luau field with no row in Properties.
GroupColor3Color3scripts only
ScrollBarImageColor3Color3scripts only
ScrollBarImageTransparencynumberscripts only
ScrollBarThicknessnumberscripts only

Scrolling

CanvasVector20, 0The canvas it scrolls, Roblox's CanvasSize; its children's Scale and its layout are of the canvas.
ScrollVector20, 0How far it is scrolled, Roblox's CanvasPosition, held between 0 and the canvas less its window.
ScrollBarnumber12
0 to 1000
Its window is its box less ScrollBar across each bar that shows.
ScrollBarColorColor31, 1, 1The colour of the bar pill drawn on an axis whose canvas is longer than its box.
ScrollBarTransparencynumber0
0 to 1

Appearance

ClipsbooleanfalseDraws everything under it only inside its box, nested ones intersected; rounded corners don't clip.
CornerRadiusnumber12
0 to 10000
Rounds the corners by this many pixels, clamped to half the short side.

Group

GroupbooleanfalseDraws it and its descendants as one picture, always clipped and cut by its round corners, like Roblox's CanvasGroup.
GroupColorColor31, 1, 1Tints the whole group's picture.
GroupTransparencynumber0
0 to 1
Fades the whole group's picture as one.

Layout

PageInViewnumber1 to 10000The page a kept UIPageLayout lays its pages round; keyable, and shown only on such a frame.
From Base2D 20
From Instance 22