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)
- Run the game on PC
- Click around the screen
- Click the button in the middle of the screen
- Observe that “No game process [mouse location]” message isn’t in the output
- Stop the game
- Select a mobile device, or use the emulator within studio and select any mobile device option
- Run the game
- Click around the screen
- Click the button in the middle of the screen
- Observe how this time, “No game process [mouse location]” is printed
- Also observe how the mouse location is different for the “No game process” and “Button pressed” outputs
Expected Behavior
- Select a mobile device, or use the emulator in studio and select any mobile device option
- Run the game
- Click around the screen
- Click the button in the middle of the screen
- 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