ui
Use when building HUDs, shops, ScreenGui, billboards, or fixing UI that is off-screen or unreadable.
- License 许可
- MIT
- 最近更新
- 2026-09-13
- Stars
- ★ 7
- Forks
- 0
01 前言 Front Matter
- name
- ui
- description
- Use when building HUDs, shops, ScreenGui, billboards, or fixing UI that is off-screen or unreadable.
03 SKILL.md 正文
UI
Prefer src/client/** with @rbxts/services (Players, StarterGui). Do not put UI logic only in Studio.
Layout
- Scale with
UDim2.fromScalefor the root; offset for padding. - Anchor point
(0.5, 0.5)for centered HUD; keep important CTAs inside the safe 16:9 center (avoid the top 36px and edges on phones). ResetOnSpawn = falseon persistent HUD;truefor death screens.- ZIndex: HUD 10, modals 50, toasts 80.
- Phone inset:
IgnoreGuiInset = trueon HUD ScreenGuis that sit under the Roblox top bar.
ScreenGui vs world UI
| Kind | Where |
|---|---|
| Coins / shop / inventory HUD | Client ScreenGui under PlayerGui |
| Nameplate / prompt label on a part | BillboardGui in world/*.model.json or cloned on the client onto a named part |
| Poster on a wall | SurfaceGui on that part |
Do not parent ScreenGui to Workspace.
Audit (Play)
If the user says they cannot see UI:
playtest_check/ Studio Output for errors.- Check
IgnoreGuiInset,ClipDescendants, and parentVisible. - ScreenGui must live under
PlayerGui. - After Rojo sync,
require(game.ReplicatedStorage.Blockforge.MapToolkit).auditOffscreenGui()(client / LocalPlayer). Do not paste MapToolkit intoexecute_luau.
Shop
Client shows buttons; server deducts coins (docs/examples/leaderstats/shop.client.ts). Remotes: docs/REMOTE_EVENTS.md. Never send the price from the client as truth. Inventory HUD: docs/examples/inventory/.
HUD: docs/examples/hud/hud.client.ts. Off-screen audit: docs/examples/mapping/ + MapToolkit.auditOffscreenGui().
catedStorage.ArenaStatusonly). Off-screen audit:docs/examples/mapping/+MapToolkit.auditOffscreenGui()`.
04 同仓库更多 Skills
vfx
Use when adding particles, beams, trails, sprite sheets, or impact/burst effects.
roblox-mapping
Alias of mapping. Use when placing 3D scenery, grounding models, scattering props, or auditing z-fighting.
roblox-icon
Alias of icons. Use when generating or editing game icons, shop thumbnails, or HUD glyphs.
pathfinding
Use when NPCs chase or walk around obstacles with PathfindingService. Keep dummies Anchored; do not vendor SimplePath.
notes
Use when reading or updating the project GDD / persistent markdown notes across sessions.
motion
Use when adding character or prop animation, Motor6D rigs, tweens, or squash/stretch motion.