The new Roblox gamepad selection blocks access to the B button pressed event when using ContextActionService.
This breaks any scripts that rely on pressing the B button when a UI element is selected.
This started occurring within the last few days.
It only occurs in live games, not in Studio.
Here is a video preview of the issue.
A private message is associated with this bug report
Here is the minimum repro for this issue.
LIVE GAME: UpliftPhoenix’s Place - Roblox
STUDIO: MinimumReproPlace.rbxl (63.3 KB)
With a gamepad connected, the square on the right changes color when you press the B button.
However, if you press the Back button to select the square on the left (which is inside a ScrollingFrame), the B button is no longer recognized until you deselect everything.
Given that this ONLY occurs in live games and not Studio, I am guessing this is related to a recent Roblox change (over the last weekend or so) that changed how the gamepad selection looks.
The script controlling the frame on the right is this:
game:GetService("ContextActionService"):BindActionAtPriority("testFunc", function(_, input_state)
if input_state == Enum.UserInputState.Begin then
script.Parent.BackgroundColor3 = BrickColor.random().Color
end
end, false, math.huge, Enum.KeyCode.ButtonB)
The issue occurs whether I use BindAction or BindActionAtPriority. When anything is selected with the gamepad, the function bound to ButtonB does not receive any Begin input at all in the live game.
1 Like
I am certain I know why this is happening now.
There must have been a recent Roblox gamepad navigation change where it was decided that if the current UI selection is a descendant of a ScrollingFrame, the player should be able to press B to select the parent ScrollingFrame.
Two things are broken about this behavior:
- The B button input is completely sunk by the roblox system and never makes it to ContextActionService, so we can’t listen to the B button to do things like close dialogs.
- This behavior occurs even if the parent ScrollingFrame is set to Selectable = false.
We are trying out a set of new changes to our selection algorithm to a small group of users to see if it improves gamepad selection usability. One of the changes is that the B button selects selects the first ancestor that is a scrolling frame. This is to help users more easily navigate to buttons above and below long lists of selectable items within scrolling frames.
There seems to be a bug where if the ancestor scrolling frame does not have the “Selectable” box checked, it will still sink the input. This is unexpected behavior and will be fixed.
1 Like
Is the AB test going to be turned off until this is fixed? We are about to release a UI focused update and it would be nice if it was working properly for all users.
Also, great to hear that this bug has been acknowledged by Roblox staff.
Forgot to respond here, but we have both fixed the issue and rolled back the A/B test.
1 Like