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.


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
| Name | Type | Default | Description |
|---|---|---|---|
| BackgroundColor3 | Color3 | scripts only | Roblox's name for Color, which Luau takes as an alias. |
| BackgroundTransparency | number | scripts only | Roblox's name for Transparency, which Luau takes as an alias. |
| CanvasPosition | Vector2 | scripts only | Roblox's name for Scroll, a Luau field with no row in Properties. |
| GroupColor3 | Color3 | scripts only | |
| ScrollBarImageColor3 | Color3 | scripts only | |
| ScrollBarImageTransparency | number | scripts only | |
| ScrollBarThickness | number | scripts only |
Scrolling
| Canvas | Vector2 | 0, 0 | The canvas it scrolls, Roblox's CanvasSize; its children's Scale and its layout are of the canvas. |
| Scroll | Vector2 | 0, 0 | How far it is scrolled, Roblox's CanvasPosition, held between 0 and the canvas less its window. |
| ScrollBar | number | 12 0 to 1000 | Its window is its box less ScrollBar across each bar that shows. |
| ScrollBarColor | Color3 | 1, 1, 1 | The colour of the bar pill drawn on an axis whose canvas is longer than its box. |
| ScrollBarTransparency | number | 0 0 to 1 |
Appearance
| Clips | boolean | false | Draws everything under it only inside its box, nested ones intersected; rounded corners don't clip. |
| CornerRadius | number | 12 0 to 10000 | Rounds the corners by this many pixels, clamped to half the short side. |
Group
| Group | boolean | false | Draws it and its descendants as one picture, always clipped and cut by its round corners, like Roblox's CanvasGroup. |
| GroupColor | Color3 | 1, 1, 1 | Tints the whole group's picture. |
| GroupTransparency | number | 0 0 to 1 | Fades the whole group's picture as one. |
Layout
| PageInView | number | 1 to 10000 | The page a kept UIPageLayout lays its pages round; keyable, and shown only on such a frame. |
