Why AI-generated Roblox UI looks flat
A model asked to write a Roblox GUI from scratch has no art to work with. What goes wrong, and what to give it instead.
Ask a model for a Roblox shop screen and you usually get the same thing: a few Frames with UICorner, one UIGradient, flat colors. It runs, it is aligned, and it looks like a placeholder. The code is not the problem. The model has nothing to draw with.
What the model is missing
- Art. Borders, highlights, glossy buttons and ornate headers are bitmaps. A model that only writes Luau can approximate them with gradients and strokes, but not reproduce them.
- Measurements. It guesses sizes and positions. Guessed numbers drift: a card is a few pixels off, a label touches an edge, a row of four is not evenly spaced.
- Stretch rules. A panel with decorative corners has to be 9-sliced, or the corners distort when you resize it. A model picking
Sizeby eye does not know where the slices are.
What to give it instead
Hand the agent finished pieces with their numbers attached: the image, its size, its 9-slice insets, where the text goes. Then its job shrinks to choosing and arranging, which models do reasonably well. The decisions that remain are layout decisions: what is the focal point, how many cards, what goes in the header.
That is the idea behind penui: a library of designer-made pieces, extracted from Figma, that an agent can search, preview and compose into one ScreenGui script.
It still needs a human eye
Real pieces do not make a good screen on their own. Two panel styles on one screen look wrong, an empty window with a single button looks wrong, and a price too small to read on a phone is wrong. Check the preview, then check Studio, and fix the layout rather than patching the generated Luau by hand.
Frequently asked questions
Why do AI-generated Roblox GUIs look like plain colored boxes?
Because a language model writing raw Luau only has Frame, UICorner, UIGradient, and UIStroke to work with. Without designer-made bitmaps, 9-slice insets, and measured typography boxes, it falls back to flat placeholder rectangles.
How does penui fix flat AI Roblox UI?
penui exposes 2,500+ Figma-extracted components and 800+ CC0 icons over MCP with exact sizes, 9-slice SliceCenter insets, editable TextLabel bounds, and parent offsets, so the agent assembles real game UI instead of guessing pixels.
Can I still inspect and adjust the UI before running it in Roblox Studio?
Yes. Agents call preview_units (free) to render a PNG and HTML preview with your custom copy drawn in before compiling the final Luau ScreenGui script.