roblox-ui
Originally fromafrxo/roblox-agent-skills
Installation
SKILL.md
Roblox UI
Foundations
- Put UI in
StarterGuiasScreenGuis (copied to each player'sPlayerGui), or create it from a client controller. UI code is client-only; the server never touchesPlayerGuiin normal designs. ScreenGuidefaults to set:ResetOnSpawn = false(keep UI across deaths),ZIndexBehavior = Sibling,IgnoreGuiInsetper design,ScreenInsets = CoreUISafeInsetsfor interactive UI (clears notches and the Roblox top bar);DeviceSafeInsets/Noneonly for full-bleed backgrounds.- Size and position with Scale (
UDim2.fromScale) plus constraints; use Offset only for fixed details (padding, strokes, icons). Pure-Offset UI breaks on phones and 4K screens. AnchorPoint = Vector2.new(0.5, 0.5)+Position = UDim2.fromScale(0.5, 0.5)centers an element.UIAspectRatioConstraintkeeps shapes square/consistent;UISizeConstraintcaps sizes;UITextSizeConstraintwithTextScaledbounds text size (prefer fixedTextSize+AutomaticSizewhere possible —TextScaledproduces inconsistent sizes).AutomaticSizelets frames grow with content (lists, tooltips, chat bubbles).- Test every screen in the Device Emulator (phone portrait/landscape, tablet, console 10-foot, 4K).