Lesson 3 of 6
Console, VR and the 10-foot screen
Get a Roblox game ready for Xbox, PlayStation and VR: 10-foot text, the TV-safe area, gamepad menus with no dead ends, Controller Emulator, console release rules and a VR comfort check on Beacon Yard.
By the end you can
- Size Beacon Yard's text and margins for a TV about 3 metres away, using GuiService.ViewportDisplaySize and the TV-safe area
- Find and fix gamepad dead ends with selection groups and a Back button, and test them in Controller Emulator
- Name what a console release needs: content ratings, no chat window, the console device setting
- Run a short VR check and switch off what makes a headset uncomfortable
Before this: UI design: Figma to Studio, hierarchy, accessibility, Input everywhere, part 1: keyboard, gamepad, touch and accessibility
Step 1 of 11
Three metres from the TV
Open the finished game at m14-ship and look at how Beacon Yard sizes its interface. Every screen calls one helper:
local shorter = math.min(size.X, size.Y)
uiScale.Scale = math.clamp(shorter / 720, 0.65, 1.4)
It reads the shorter side of the viewport in pixels and divides by 720. That was the right fix for phones in UI fundamentals: ScreenGui, UDim2, layouts. Now think about two players. One has a 15.6 inch laptop, 60 cm from their eyes. The other has a 55 inch TV, 3 metres from the sofa. Both screens are 1080 pixels tall.
Console players sit 8 to 10 feet (2.4 to 3 metres) from the screen, and Roblox's console guidelines ask you to build for that ten-foot experienceTen-foot UIAn interface built to be read and used from a sofa, about 3 metres from a TV, with a gamepad.Think of it as the menu board on the wall of a café, not the menu in your hand.1.
UiScale.luau runs on the laptop (1920 by 1080) and on the TV (1920 by 1080). What does this print?
local function scale(x, y)
return math.clamp(math.min(x, y) / 720, 0.65, 1.4)
end
print(scale(1920, 1080), scale(1920, 1080))
Press 1 to 4 to choose, Enter to check.
Step 2 of 11
How big text looks from the sofa
What your eye sees is the angle a letter covers. A pixel on the 55 inch TV is bigger than a pixel on the laptop, but the TV is five times further away. Divide the height of one pixel by the distance and you can compare any two screens.
| In the picture | In Roblox |
|---|---|
| Reading the board from the back of the café | Reading the TV from a sofa about 3 metres away, so the same pixels look smaller |
| Bigger letters on the board | Larger text when GuiService.ViewportDisplaySize is Large, such as Beacon Yard's Larger text setting |
| A pillar that hides the edge of the board | A TV that crops the outer edges of the picture, so essential UI stays in the TV-safe area |
A phone or laptop is the menu in your hand. A console is the menu board on the wall across the café: the same words need bigger letters, because you read them from the back of the room.
Think of it as The menu board on the wall across a café, instead of the menu in your hand
Run the cell. The heights are the picture heights of a 16:9 screen: 19.4 cm for the 15.6 inch laptop and 68.5 cm for the 55 inch TV.
Beacon Yard already has a lever for this. The Larger text setting multiplies every registered label by Config.LARGE_TEXT_SCALE, which is 1.3. That is close to the 1.42 the distance asks for. A good default for a TV is to start with Larger text on, and let the player turn it off.
The shop buttons use 24 px text. Using the 1.42 factor from the cell, how many pixels should that text be on the TV to look as big as it does on the laptop? Round to a whole pixel.
Step 3 of 11
The edges a TV may cut
Roblox has a better signal than pixel counts. GuiService.ViewportDisplaySize is Small on most phones and tablets, Medium on most laptops and monitors, and Large on most TVs2. The older GuiService:IsTenFootInterface() is superseded: it returns true on any console, however the player is using it3.
Size is half the problem. Some TVs do not show the picture all the way to the edges, so the guidelines ask you to keep UI inside the TV-safe areaTV-safe areaThe part of the picture every TV shows. Some TVs cut off the outer edges, so essential UI stays inside.Think of it as the part of the wall a pillar never hides.1. They give no number. Microsoft's guidance for Xbox apps does: keep essential UI out of the outer 5 percent of each edge4. On a 1920 by 1080 picture that is 96 px from the sides and 54 px from the top and bottom.
Now read where Beacon Yard puts its stats panel:
panel.AnchorPoint = Vector2.new(0, 0)
panel.Position = UDim2.fromOffset(16, 16)
panel.Size = UDim2.fromOffset(460, 0)
The panel sits 16 px from the left edge, and the toasts sit 20 px above the bottom edge. ScreenGui.ScreenInsets keeps UI clear of phone notches and the Roblox top bar, but its documentation says nothing about TV overscan, so do not count on it here.
On a 1920 px wide picture, the safe area starts 96 px in. Beacon Yard's stats panel starts 16 px in. How many pixels further right must it move?
Step 5 of 11
Fence the highlight in
A second guard keeps the highlight inside a panel. Any frame can become a selection groupSelection groupA GUI container with SelectionGroup set to true, whose SelectionBehavior properties decide whether gamepad selection may leave it.Think of it as a fenced pen: the highlight can move freely inside, and the gate decides whether it can wander out.: set SelectionGroup = true and its SelectionBehaviorUp, Down, Left and Right properties apply. Escape, the default, looks inside the group first and leaves when nothing fits. Stop keeps the selection inside5. For a modal panel such as settings, Stop on all four sides is the usual choice.
Roblox also offers a virtual cursor as an alternative to directional selection, and the guidelines suggest bespoke navigation for unusual layouts1. For a column of buttons, directional selection is the better fit.
You set SelectionGroup = true and every SelectionBehavior to Stop on the settings panel, then press down on Larger text. Nothing looks different from before. Why?
Press 1 to 4 to choose, Enter to check.
Now test the café analogy against the last two steps. The board picture explained text size and margins well. Answer before you open the breakdown.
Where does it break?“The menu board on the wall across a café, instead of the menu in your hand” is a good picture of a ten-foot console screen. Where does it stop being true?
It breaks here. A menu board is only read. A console menu is also walked one step at a time with a D-pad, so it can trap the player in a dead end and needs a way back, which no board has.
The true model. A console screen is read from far away and driven by sequential gamepad navigation. Size and margins answer the distance; selection links, selection groups and a Back button answer the navigation.
Which console problem does the café menu board picture not explain at all?
Press 1 to 4 to choose, Enter to check.
Step 6 of 11
Before you switch Console on
Console reach is opt-in. Which devices can play is a setting of your experience, and the Creator Hub's activity history logs every change to its playable devices6. Before you turn Console on:
- Content ratings. Games designed for consoles always need content ratings, or they risk being removed from consoles1.
- No chat window. Roblox asks you to disable the chat window for console games, however you customise chat. The chat window and input bar can be switched off in Studio or from a script7.
- Button icons that match the pad.
UserInputService:GetImageForKeyCode()returns Roblox's Xbox or PlayStation icon for a key code, so a hint never shows the wrong button1. - Haptics, sparingly. A
HapticEffectcan rumble the pad for the drone's hit8. Constant vibration annoys players, so keep it for moments that matter1.
Beacon Yard uses chat for one game message. When a drill starts, RoundService asks AnnounceService to post a system line:
pcall(AnnounceService.say, "Drill started")
RoundService announces "Drill started" through AnnounceService, which writes a system line in the chat window. With the chat window off on console, how does a console player know the drill began?
Press 1 to 4 to choose, Enter to check.
Step 7 of 11
A short VR check
Roblox runs VR through OpenXR, so Quest headsets and PC VR headsets share one implementation9. You will not build a VR mode here. You will check what a headset player meets in Beacon Yard.
- Scale feels real. In VR one stud is
0.3 m / Camera.HeadScale10. The drone's 12 studs per second becomes a speed a player feels in their stomach. - The camera belongs to the player's head. Roblox's default camera scripts support the comfort options (vignette, stepped rotation, a fixed third-person camera), and replacing them opts you out of those updates9. Tilting or rolling a VR player's view can make them dizzy10.
- Beacon Yard's Zoom.
CameraClienttweensFieldOfViewbetween 70 and 50 when you press Q or Y. That is a deliberate change to what the player sees, the kind of camera motion comfort settings exist to soften. Turn it off whenVRService.VREnabledis true (a property you can only read in a LocalScript)11. - Performance. Quest's Auto Quality Mode aims for at least 72 frames a second, and the guidelines recommend streaming, fewer draw calls and fewer transparent parts9.
Beacon Yard's drone moves at DRONE_SPEED = 12 studs per second. With HeadScale = 1, one stud is 0.3 m in VR. How fast does the drone come at a headset player, in metres per second?
Step 8 of 11
Choices, and what studios do
Other ways pros do this
| Option | What it is | When pros pick it | Trade-offs |
|---|---|---|---|
| Default directional selection | Roblox moves the highlight to the nearest selectable button in the pressed direction. | Simple columns and grids, like Beacon Yard's shop. | Odd layouts can jump to a surprising button; test every direction. |
| Explicit NextSelection links | Set NextSelectionUp, Down, Left and Right on each button. | Layouts where the nearest button is not the logical next one. | Every new button needs its links updated, or it becomes unreachable. |
| Selection groups with Stop | Fence the highlight inside a panel with SelectionGroup and SelectionBehavior. | Modal panels: shop, settings, dialogs. | Every fenced panel needs a Close button or a bound Back action. |
| Virtual cursor | A pointer the stick moves, built into Roblox. | Dense or free-form UI such as maps and inventories. | Slower than directional moves for a simple list. |
You want Beacon Yard to start with Larger text on when it runs on a TV. Which value should the client read?
Press 1 to 4 to choose, Enter to check.
Step 9 of 11
Build along: menus with a way out
Open your own copy of the finished game. Choose Test > Device Simulator to show the toolbar above the viewport. The toolbar is available in the full release. The Controller Emulator can emulate Xbox, PS4 and PS5 pads, Quest controllers and an Android TV remote12.

Select a numbered pin, or a row below, to read what it marks.
Beacon Yard on a simulated console: the shop opened with the X button, Speed selected, and the Controller Emulator lighting up the pad.
Build along
src/client/SettingsGui.luausrc/client/Controls.luau
In the Device Simulator toolbar, pick a Console device. Open Virtual controller from the toolbar or Controller in the Emulation tab, then choose Xbox. Press Play, click the emulator so it has focus, and drive everything from the pad: walk to the Quartermaster, open the shop, close it, then open Settings and try to back out. Also note what D-pad up does now.
You should see X at the Quartermaster opens the shop with Speed selected, and B closes it. D-pad up opens Settings with Reduced motion selected, and B leaves the panel open.
In
SettingsGui.luau, setpanel.SelectionGroup = trueand all fourSelectionBehaviorproperties toEnum.SelectionBehavior.Stop. InControls.luau, add aCloseSettingsaction onEnum.KeyCode.ButtonBwith no touch button (copyCloseShop, and add the name toActionName). Bind it when the panel opens; unbind it and clearGuiService.SelectedObjectwhen it closes.You should see Pressing down on Larger text keeps the highlight on Larger text, and B closes the Settings panel and clears the selection so the stick moves the character again.
Step 10 of 11
Build along: text, margins and VR
Now the screen itself. Keep the console device and the Xbox pad from the last step.
Build along
src/client/Accessibility.luausrc/client/Hud.luausrc/client/CameraClient.luau
In
Accessibility.start, next to the line that seeds ReducedMotion fromGuiService.ReducedMotionEnabled, readGuiService.ViewportDisplaySizeinside apcall, print it, and when it isEnum.DisplaySize.LargerequestLargeTextonce, with the same "only send a true" rule. The docs do not say which size Device Simulator reports for a console, so if yours reads Medium, test the branch by comparing against Medium for one run, then put Large back.You should see The Output shows the display size. When it reads Large, Settings already shows Larger text: on when you open it, and the shop's 24 px button text becomes 31 px.
In
Hud.luau, change the stats panel's position fromUDim2.fromOffset(16, 16)toUDim2.fromScale(0.05, 0.05), and the toasts' fromUDim2.new(0.5, 0, 1, -20)toUDim2.fromScale(0.5, 0.95). Switch between a phone, a desktop and a console device and check each.You should see The stats panel starts 5 percent in from the left and top edges, and the toasts sit above the bottom 5 percent, on every simulated device.
In
CameraClient.luau, readgame:GetService("VRService").VREnabledand skip binding theCameraFieldOfViewaction when it is true. Leave everything else alone. If you have a headset, try a drill in it before you change anything else.You should see On your desktop, Q still zooms between 70 and 50, because VREnabled is false there.
Put the steps to take Beacon Yard to consoles in a sensible order.
- Complete the content ratings questionnaire
- Fix dead ends and text size, and test with Device Simulator and Controller Emulator
- Turn off the chat window for console players and move anything important out of chat
- Test on a real console and TV, then turn on Console in the experience's playable devices
Step 11 of 11
Challenges and recap
Fix sameLookPx so it compares how big a pixel looks from each seat, not only the distances. The laptop and TV are the ones from this lesson.
Level 1, Apprentice
Challenge
Fix sameLookPx in the sofa-check cell so all three tests pass.
- Start from
- The game at milestone m14 (download)
- Check it here
- Run the code cell; the challenge completes when it passes. No Studio needed.
Done means
- sameLookPx uses each screen's heightCm / rows / distanceCm
- 24 px on the laptop gives 34 px on the TV, and 18 gives 25
- All three assertions in sofa-check pass
Retiring the analogy
You no longer need “the menu board on the wall across a café, instead of the menu in your hand”. A console screen is read from far away and driven by sequential gamepad navigation. Size and margins answer the distance; selection links, selection groups and a Back button answer the navigation.
Recap
- A TV is read from about 3 metres away: pixel-based scaling cannot see that, so read GuiService.ViewportDisplaySize and treat Large as a TV.
- Text needs about 1.4 times the pixels on a 55 inch TV at 3 m; Beacon Yard's Larger text (1.3) is the lever, switched on by default for Large.
- Keep essential UI out of the outer 5 percent of a TV picture: scale positions, not 16 px offsets.
- Every menu needs a way out from every button: a Close button reachable by D-pad, or B bound while it is open, and a selection group with Stop for modal panels.
- Console needs content ratings and no chat window; VR needs a comfortable camera, so Beacon Yard skips its FOV zoom when VREnabled is true.
A ten-foot console screen is the menu board on the wall across a café, instead of the menu in your hand, until a menu board is only read. A console menu is also walked one step at a time with a D-pad, so it can trap the player in a dead end and needs a way back, which no board has.
Queued for review
- UiScale.luau runs on the laptop (1920 by 1080) and on the TV (1920 by 1080). What does this print?
- On a 1920 px wide picture, the safe area starts 96 px in. Beacon Yard's stats panel starts 16 px in. How many pixels further right must it move?
- Which change makes Beacon Yard's settings panel work like its shop for a gamepad player?
- You set SelectionGroup = true and every SelectionBehavior to Stop on the settings panel, then press down on Larger text. Nothing looks different from before. Why?
- You want Beacon Yard to start with Larger text on when it runs on a TV. Which value should the client read?
Next UI frameworks, part 1: React-lua, elements, props and state