Setup an ImageButton or TextButton like so and have their Active property set to false:
To see if an input has sunk or not we’ll use UserInputService’s InputBegan event and print the gameProcessedEvent argument. To do that make a LocalScript with the following code and parent it in any valid container (I parented it to the ScreenGui):
On PC, when you press the GuiButton with its Active property set to false, the gameProcessedEvent prints true, meaning the GuiButton sank the input
On mobile it works as expected, when the GuiButton’s Active property is false, the gameProcessedEvent will print false
Expected Behavior:
If a GuiButton’s Active property is false, the input should not be sank upon pressing.
The current behavior is problematic as it wasnt like this before and will break any GUI that relies on the previous behavior, I noticed this issue because my plugin broke after this change a while ago.
Hi @Aspecky , the sinking behaviors for non Active GuiButtons are different for mouse input and mobile touch, and it has been like this for a long time. We have attempted to fix this issue years ago, but it broke some games that replied on this behavior.
Could you kindly double check if this behavior has changed recently and specify the timepoint you noticed the change? Thank you!
The behavior i described is still persistent, non Active GuiButtons will sink input for mouse as long as you are pressing on them, but on mobile they’ll pass right through, as in they respect mobile better than mouse.
The way I spotted this change was because of my UI Editor plugin where I had this functionality where if you scroll inside a TextBox you’ll be able to increment your ui.
And to know if they scrolled i’d use MouseWheelForward/Backward on the TextBox itself, but randomly the scrolling functionality broke without me touching the code, but I forgot the date when that happened, it could have been anywhere between September 30, 2022 and February 19, 2023 because I was very lazy to employ a fix. But I wasnt using any GuiButtons, so I dont really think my plugin is relevant to this.
I understand that, but this difference in behavior causes friction on developing for both mobile and pc, and one of Roblox’s strongest suits is cross-platform compatibility, and this kinda hinders that