Studio / ROBLOX
Roblox safe area: fix a button clipped on mobile
Set ScreenInsets for menus and HUD, then check the device cutout, Roblox top bar, and touch interaction separately.
Reproduce the clipping on one control #
Place an Inventory button near the corner of a test ScreenGui. Open a wide viewport and a phone preset with a cutout. When clipping appears only on the phone, identify what covers it: the camera, Roblox controls, or your own panel. Visible padding and a lost tap require different follow-up tests.
Keep essential controls in CoreUISafeInsets #
Select ScreenGui in Explorer and find ScreenInsets in Properties. Start with CoreUISafeInsets for buttons, status labels, and important notices because this inset accounts for device cutouts and Roblox interface elements. Try the setting with a single button first so you can compare it before moving the whole menu.
Put decoration and interaction on separate layers #
Use one ScreenGui for a decorative edge-to-edge background and set None there if needed. Keep the interactive controls in another ScreenGui with a safe inset. Verify the background draws behind the menu in both viewports. DeviceSafeInsets protects against cutouts but does not reserve the Roblox top bar.
Avoid a fixed offset as the whole fix #
Turning on IgnoreGuiInset while CoreUISafeInsets is selected changes the inset to DeviceSafeInsets. Give the control a relative position and an AnchorPoint suited to the corner; add a small UIPadding if needed. Increase the text length and check that the label and the tappable area both remain inside the available space.
Test orientation and actual taps #
In Studio emulation, compare a narrow portrait preset and a wide landscape preset. Open and close the inventory, tap near each corner of its button and watch for interception by top-bar controls. Repeat on a physical phone when available. Emulation reveals layout issues; device testing confirms the interaction you want.
Keep three regression results #
Record the device preset, orientation, and ScreenInsets choice. Pass criteria are a background that reaches the edge, a fully readable button, and a command that runs once per tap. When a button looks fine yet is dead in every orientation, inspect layering and its event handler next.
| What to check | Expected result |
|---|---|
| Screen corner | Identify the overlay |
| Controls | Clear of the top bar |
| Background | Separate ScreenGui |
| Long label | Fits fully |
| Rotation | Button remains tappable |
| Action | One response per tap |
Original sources
Roblox API · ScreenGuiRoblox API · ScreenInsets
Roblox Creator Hub · HUD meters

