UI generation
Generate Roblox ScreenGui behavior, responsive HUDs, menu flows, and LocalScript patterns with server-safe RemoteEvent boundaries.
GUI responsibilities
| Layer | Owns | Avoid |
|---|---|---|
| ScreenGui | Visual hierarchy, labels, buttons, frames, and HUD containers. | Business rules and reward authority. |
| LocalScript | Input, button clicks, local animation, camera feedback, and RemoteEvent calls. | Granting currency, inventory, or permissions. |
| Server Script | Validation, state changes, rewards, purchases, and multiplayer truth. | Client-only animation or camera state. |
Responsive UI
- Use scale values and constraints for layouts that must work on phone, tablet, and desktop.
- Keep click targets large enough for touch.
- Do not rely on color alone for selected, disabled, or error states.
- Test with Roblox Studio device emulation before publishing.
LocalScript pattern
local ReplicatedStorage = game:GetService("ReplicatedStorage")local button = script.Parentlocal remotes = ReplicatedStorage:WaitForChild("Remotes")local buyItem = remotes:WaitForChild("BuyItem")button.Activated:Connect(function() button.Active = false buyItem:FireServer("StarterSword") task.delay(0.5, function() button.Active = true end)end)Was this page helpful?