Player movement corescripts should not sink input to default keys/buttons

Issue Type: Other
Impact: Moderate
Frequency: Constantly
Date First Experienced: 2021-04-17 10:04:00 (-04:00)
Date Last Experienced:

Reproduction Steps:

  1. Bind an action to the “A” button on an xbox controller
  2. Notice that your binded action is sometimes not ran, because the player movement module sinks input to it (Gamepad.lua, line 96).

Expected Behavior:
I expect the corescripts to not sink input to any buttons. There are cases where I as a developer want to bind actions on top of a default-binded button, e.g. I bind an action to the “A” button on xbox even though it’s already default-binded to being a jump button.

Actual Behavior:
The corescripts sink input to default-binded keys instead of passing, making it impossible for me to bind my own actions on top of them.

Workaround:
The current workaround is to manually fork the player module corescripts and replace the lines of code that sink input to ones that would pass input.

6 Likes

Hello! We haven’t been able to reproduce this issue. Can you please upload a repro file? Thanks!

Apologies for the late reply. I can have a repro file for you tomorrow! :slight_smile:

1 Like

I have a repro here:
InputSink_Repro.rbxl (146.7 KB)

  1. Run playsolo with an xbox controller. Notice that pressing the A key on the xbox controller causes output to display in the console.
  2. Press space on your keyboard. Notice that it causes output to display in the console.
  3. Press A again on the xbox controller. Notice that your avatar still jumps, but output is no longer logged to the console.
  4. Stop the playsolo session, and drag the forked playermodule from ServerStorage into StarterPlayerScripts.
  5. Repeat steps 1-3 above. Notice that in step 3, output is now properly displayed when A is pressed again on the xbox controller.

I’ve modified the corescripts in Gamepad.lua, line 96 to pass the input instead of sinking it. That fixes the above issue.

Thanks for the report! We’ve filed a ticket to our internal database and we’ll follow up when we have an update for you.

3 Likes

Are there any updates on this?

This issue is still occurring.

I ran into this issue recently and I am surprised to see that an issue like this has been around for years. Even setting the priority of my action higher than the default jump action doesn’t work. I would like to see an update as this gives developers one less button to work with on controllers which already have too few buttons.