ContextActionService doesn't fire consistently for PlayerActions.CharacterJump when ButtonA is used

When connecting a ContextActionService binding to Enum.PlayerActions.CharacterJump, and then using ButtonA on controller to trigger the binding, the callback is not invoked consistently opposed to other methods of triggering Enum.PlayerActions.CharacterJump.

How to repro:

  1. Open a new baseplate
  2. Press Play Solo (accurate or not)
  3. Connect the binding by putting this in the command bar:
game:GetService("ContextActionService"):BindActionAtPriority(
    "TestButtonA",
    function()
        print("test")
    end,
    false,
    1e9,
    Enum.PlayerActions.CharacterJump
)

Observed behavior:

When pressing space bar, the behavior is as expected:

  • Pressing space bar causes “test” to be printed (start of action)
  • Releasing space bar causes “test” to be printed (end of action)

When using ButtonA on a connected controller instead, one of these situations is observed:

  • Either: pressing ButtonA once will print “test”, but releasing it does not, and no subsequent presses of ButtonA will trigger the callback.
  • Or: Pressing ButtonA will trigger “test” to be printed consistently, but releasing ButtonA will never trigger “test” to print at all.
  • It is never the case that ButtonA triggers the callback correctly for both pressing and releasing the button, unlike when using space bar.

Expected behavior:

It should be the case that the binding triggers correctly when ButtonA is pressed and when the button is released.

Additional notes:

I’ve also seen this happen to bindings that are connected to Enum.KeyCode.ButtonA directly rather than to Enum.PlayerActions.CharacterJump.

I have only tested this in Studio but assume that it occurs in both.

It might be related to the fact that Roblox associates ButtonA with jumping, although it really should not because I have a priority on my binding (1e9) that far exceeds that of any existing binding.

6 Likes

I can confirm this is happening. My current project’s gamepad controls aren’t functional because you can’t use the jump button at all.

Okay, on top of this, UserInputService isn’t returning ButtonA at all. Below I’m printing every input and you’ll notice that when I jump using the gamepad’s A button nothing appears.

OKAY as it turns out, Enum.KeyCode.ButtonA always returns its ProcessedEvent as “true” for some reason, which is a separate bug

2 Likes

Can confirm issue happens with UserInputService too, if a function is connected to InputBegan, InputChanged or InputEnded