Gameprocess on UserInputService acts differently on mobile and pc

Reproduction Steps
ISSUE HAPPENS IN STUDIO AND IN GAME

Download the file and insert the object to StarterGui in a new place.
GameProcessed bug.rbxm (4.8 KB)

  1. Run the game on PC
  2. Click around the screen
  3. Click the button in the middle of the screen
  4. Observe that “No game process [mouse location]” message isn’t in the output
  5. Stop the game
  6. Select a mobile device, or use the emulator within studio and select any mobile device option
  7. Run the game
  8. Click around the screen
  9. Click the button in the middle of the screen
  10. Observe how this time, “No game process [mouse location]” is printed
  11. Also observe how the mouse location is different for the “No game process” and “Button pressed” outputs

Expected Behavior

  1. Select a mobile device, or use the emulator in studio and select any mobile device option
  2. Run the game
  3. Click around the screen
  4. Click the button in the middle of the screen
  5. Observe that “No game process [mouse location]” message isn’t in the output

Actual Behavior
Running the game on PC:


Everything acts normal.

Running the game on the emulator (mobile also works)


Notice how no game processed is fired despite being on top of the button. The mouse location is also different. I suspect that on mobile, button clicks are registered before the mouse location is updated, causing the system to think the mouse isn’t on the button but on another part of the screen.

In this video I’ve also included where the mouse location is directly after the MouseButton1Down event is fired (in green):

Notice how the mouse location is at the previous click.
Repro file with the green frame:
GameProcessed bug with green indicator.rbxm (4.9 KB)

Workaround
Add a wait before getting the mouse location, or double-tap.

Issue Area: Studio
Issue Type: Other
Impact: Moderate
Frequency: Constantly

3 Likes

Thanks for the report! We’ll follow up when we have an update for you.

1 Like

can you follow up with a fix, this is still an issue…

Hey! This seems to have been resolved:

for me gameprocess is false when i click on ui, might be cause the ui is child of a frame though im not sure i need to try it

1 Like

Thanks for reporting! We’re currently looking into this.
Seems like you’ve set the “Active” property for the image button to false. Once you change that to true, gameProcessed should be correct on all platforms.
At the mean time, we’ll look into why pc still sets gameProcessed to true when “Active” is false. Thanks!

Also, please let me know if changing “Active” on ImageButton to true would resolve your issue. We can help investigate if that doesn’t help. Thanks!

This seems to resolve the issue where game process was not being detected on mobile. Although, I don’t know if this is supposed to be intentional as the behavior is still different on mobile and PC if active is false.

For that, the context was, we did have a fix to make all platforms behave the same when “Active” is false, but then lots of games are relying on the old behavior and the fix has broken lots of games, so we rolled it back. For now, we can only turn “Active” to true to make all platforms behave the same way. And we might introduce a new property if necessary to deactivate the input on buttons for all platforms in the future. Hope it helps!

1 Like