roblox-ui
Roblox UI with ScreenGui and PlayerGui: ResetOnSpawn, UDim2 scale and offset, UIListLayout flex, safe areas, StyleSheet, gamepad selection and touch controls. Use for Roblox HUDs, shops or settings menus, or UI that clips on phones, resets on respawn or loses controller focus. Load `game-ui-ux` too. Not for input mapping (`input-systems`) or purchase checks (`roblox-networking`).
Install
npx skills add https://github.com/gamedev-skills/awesome-gamedev-agent-skills --skill roblox-uiRoblox UI
Build editable Roblox interfaces that keep the experience's visual language and work on every
supported device. This skill owns the Roblox Instances and APIs; game-ui-ux owns the design
rules, so load both for menu and HUD work.
Workflow
- Inspect before designing. Inventory existing
ScreenGuis, UI modules, fonts, colors, icon family, spacing, corners, strokes, animation timing, naming, and anyStyleSheet/StyleLinktokens. Capture two viewports (screen_captureover Studio MCP, or ask the user for screenshots). Extend that language. - Define ownership and lifecycle.
StarterGuiis the authored template; Roblox clones it into eachPlayerGui. Decide perScreenGuiwhether it survives respawn (ResetOnSpawn = false) and never keep references to a destroyed clone. - Author a readable hierarchy. Named, editable Instances plus small behavior modules. A screen should make sense in Explorer; procedural creation is for data-driven repetition only.
- Build responsive structure.
UDim2scale for placement, bounded offsets for components, matchingAnchorPoints, layouts, padding, and size constraints. Design an explicit narrow arrangement instead of shrinking the desktop panel. - Handle obstructions. Keep interactive UI inside
CoreUISafeInsets(theScreenInsetsdefault) and away from the touch movement and jump controls; allow for TV overscan. - Wire state and input. Render from a small view state. Use
Activatedfor buttons, explicit selected states, and a reachable gamepad path. Bind screen actions only while the screen owns them. - Polish with restraint. Hover, pressed, selected, disabled. Animate state changes, honor
GuiService.ReducedMotionEnabled, and cancel tweens and connections on close. - Check before reporting. Build-level:
rojo build <project>.project.json -o out.rbxlxmust succeed for Rojo projects. Live, with the Studio MCP server connected: start play, open the screen fromexecute_luauon theClientdatamodel, printGuiService.SelectedObjectand theAbsoluteSizeof the root and scroll canvas, thenscreen_capture; Studio's built-inrbx-device-simulator-luaskill (through theskilltool) switches device presets for the viewport matrix. Without MCP, ask the user to check the matrix inreferences/responsive-layout.mdwith Device Simulator and Controller Emulator and report clipping, overlap, focus path, and respawn behavior.
Production structure
Names describe roles, not colors or positions. Repeated cells are templates or components; the shell stays visible in Explorer.
Patterns
Layout that survives content and viewport changes
UIListLayout for one-dimensional flow (with flex for shared space), UIGridLayout for uniform
cells, UITableLayout only for real tables. AutomaticSize fits content; AutomaticCanvasSize
fits scroll content. Bound extremes with UISizeConstraint, UIAspectRatioConstraint or
UITextSizeConstraint rather than one global UIScale. In a styled project, a StyleQuery can
switch rules at a size breakpoint without a resize script.
One activation path and explicit gamepad entry
Choose input-dependent UI from UserInputService.PreferredInput, which follows the player's
primary device. TouchEnabled and GamepadEnabled are capabilities (a touch laptop reports
touch), and GetLastInputType() flips on every stray input. Set NextSelection* where automatic
navigation is ambiguous (grids, sidebars, modals). A modal traps focus with
SelectionGroup = true plus SelectionBehavior* set to Stop, and restores a sensible selection
on close. If the default selection adornment overwhelms the design, give it a project-owned
SelectionImageObject; do not remove focus feedback.
State transition without animation noise
Animate the panel once, not every descendant, and cancel the previous tween so a fast open and close cannot leave the panel invisible but interactive.
In a styled project, a state change driven by a tag or GuiState can use a StyleRule transition
instead of a tween; transitions fire only for changes made through the styling system.
Visual quality gates
- Build hierarchy with size, weight, contrast, grouping and whitespace before decoration. Use a small spacing scale and align to it.
- Keep the game's fonts, palette, icons, radii and strokes. In a styled project, change tokens and
StyleRules, not per-instance properties. With no system in place, define a compact token set (a tokenStyleSheetor module) instead of improvising per component. - Corners where the form calls for them, not on every nested
Frame. Avoid card-on-card shells, universal pills, arbitrary gradients, glows, neon outlines, heavy transparency or blur, oversized headings, meaningless icons, and huge empty panels. - Buttons of different importance look different: primary, secondary, quiet, destructive, plus selected, pressed, hover and disabled states only as needed.
- Motion explains open and close, focus, confirmation, or spatial relationships. Keep it short and interruptible; no perpetual motion.
- On touch, keep bottom actions clear of the movement and jump controls, and show hints only for
the current
PreferredInput.
Gotchas
Resources
- Read
references/responsive-layout.mdwhen a screen must adapt across viewports or a layout defect appears: layout primitives, flex, insets, density, and the required viewport matrix. - Read
references/input-navigation.mdwhen implementing gamepad or touch focus, modals, Input Action System bindings for screen actions, or motion preferences. - Build
assets/inventory-quality-test.project.jsonwith Rojo when you need an editable Instance fixture for layout review:rojo build assets/inventory-quality-test.project.json -o inventory-test.rbxlxfrom the skill directory. It is a test baseline, not a style to ship.
Related skills
game-ui-ux: information hierarchy, screen flow, accessibility, and design rules.input-systems: gameplay action mapping and device switching.roblox-networking: server-authoritative requests started from UI.roblox-studio-workflow: Explorer-first editing and Studio verification.
Version notes
Last verified: 2026-11-30.
StyleQueryand enhanced styling reached full release in May 2026; styling transitions are also fully released.Enum.PreferredInputvalues:KeyboardAndMouse,Gamepad,Touch,MicroGamepad(a gamepad without a thumbstick, such as a TV remote).GuiBase2d.SelectionGroupandSelectionBehaviorUp/Down/Left/Rightare the property-based way to contain navigation.GuiService:AddSelectionParent(),AddSelectionTuple()andRemoveSelectionGroup()are deprecated; do not use them in new work.- Rojo 7.7.1 builds the bundled fixture.
- To re-check an API: append
.mdto its Creator Hub URL, or start fromhttps://create.roblox.com/docs/llms.txt.
Sources: https://create.roblox.com/docs/ui/on-screen-containers,
https://create.roblox.com/docs/ui/position-and-size,
https://create.roblox.com/docs/ui/size-modifiers,
https://create.roblox.com/docs/reference/engine/enums/PreferredInput,
https://create.roblox.com/docs/reference/engine/classes/GuiService,
https://create.roblox.com/docs/assistant/skills (built-in Studio skills),
https://devforum.roblox.com/t/full-release-stylequery-more-styling-features/4566519,
https://create.roblox.com/docs/reference/engine/deprecated,
https://create.roblox.com/docs/reference/engine/classes/ContextActionService.