Roblox GuidebookKnowledge base
English ⌄

Studio / ROBLOX

Roblox gamepad buttons are not selected: fix menu focus

Check the first selection, directional navigation, activation and focus restoration when a menu closes.

Updated:

Observe the selection before changing code #

Open a test menu with Map, Settings and Close. Note whether a selection outline appears, whether it moves with directional input, and whether confirmation runs the action. Those are three checks. An outline that moves while the action fails points to a different problem from missing selection.

Select a valid first button #

When opening the menu for gamepad input, choose a visible eligible button and assign GuiService.SelectedObject on the client. Check Selectable and the parent menu's availability. If automatic selection initiation is disabled, an explicit first selection can start navigation when GUI navigation is enabled.

Set neighbors where geometry is ambiguous #

Start with the natural layout of the list. If selection skips a button or leaves the window, review NextSelectionUp, NextSelectionDown and horizontal neighbors. In a two-column grid, test edge positions and an incomplete last row. A link should never send focus into a hidden or unavailable menu.

Checks 1–3 · Roblox gamepad buttons are not selected: fix menu focusOpen full-size image ↗
Checks 1–3 · Roblox gamepad buttons are not selected: fix menu focus

Clear stale focus when a button disappears #

After filtering or disabling an item, move SelectedObject to an eligible remaining button or clear it. Setting Selectable to false does not deselect a button that already owns focus. When a modal closes, restore a valid previous selection or clear it if no menu remains open.

Test navigation and activation separately #

Use Controller Emulator in Studio or a physical controller. Visit each button in order, confirm the harmless actions and close with the intended cancel control. Reopen, then switch from mouse to gamepad. Record the selected element and the action that fires.

Check the smallest layout #

Test after changing resolution and, if relevant, rotating a tablet. Include a menu with only one enabled button. Pass when a first selection appears, navigation is predictable, one press runs one action and no focus is left behind a closed window.

Checks 4–6 · Roblox gamepad buttons are not selected: fix menu focusOpen full-size image ↗
Checks 4–6 · Roblox gamepad buttons are not selected: fix menu focus
What to checkExpected result
OpenOutline visible
First controlSelectable
DirectionMoves to expected neighbor
Hidden controlMove focus away
ConfirmOne action
CloseRestore focus

Original sources

Roblox Creator Hub · GuiService.SelectedObject
Roblox Creator Hub · GuiObject.Selectable
Roblox Creator Hub · Gamepad input