Allow Gamepad Navigation (using NextSelection props) to Skip Visible=false GUI Objects

As a Roblox developer, it is currently too hard to effectively utilize Roblox’s Gamepad navigation system when utilizing NextSelectionRight/etc. properties with invisible GUIObjects. When these properties are not set, Roblox’s “best guess” for navigation works pretty well regardless of if there may be invisible GUIObjects along the path. However, when these properties are set and elements along the chain are invisible (Visible = false), Roblox doesn’t skip over them but rather just stops in its track. This requires code to detect when visibility changes and to manually update the selection properties, making it more tedious to create UI that is easy to navigate with a Gamepad.

My suggestion is that upon navigation when these properties are set, continue skipping elements if they are invisible until either the end is reached or the initial GUIObject is reached in case of a cycle. I can’t think of any potential issues with skipping invisible elements. The logic could be something similar to (pseudo-code)

local function navigateRight(selection: GuiObject): GuiObject?
	local nextSelection = selection.NextSelectionRight
	while nextSelection and nextSelection ~= selection do
		if nextSelection.Visible and nextSelection.Selectable then break end
		nextSelection = nextSelection.NextSelectionRight
	end
	return nextSelection
end

If Roblox is able to address this issue, it would improve my development experience because it would make it far simpler to update UI to improve Gamepad support without having to write code to explicitly handle UI that may have buttons that are dynamically made visible/invisible.

Specifically, in our game we have a menu at the top of the screen that can be navigated (with it cycling when it reaches an edge), but in some cases some of these buttons may become invisible (e.g., unreleased feature, Player role/class selection doesn’t support some feature, etc.). A very specific example can be seen here: Watch 2025-12-01 21-34-51 | Streamable. Notice that the cycling only works the edge buttons are visible, but doesn’t otherwise, requiring a custom solution to handle this.

2 Likes