Mouse goes through ui button

I am trying to create a placement system it works perfectly fine on PC. However, On mobile when I tap on the buttons to rotate or place it clicks it but it moves the building when I click like the mouse is going through the button here is a video.


Any help will be appreciated.

1 Like

In UserInputService you can check if UI was clicked or the screen.

Also its GameProcessed event in the UserInputService.

Custom UI is not a GPE. @AlexiSanchezReal, you might want to try and test the game on an actual mobile device, as a mouse won’t be present during mobile gameplay

1 Like

Hello, I have tested it on a physical mobile device and the issue persists, However, I have found a fix using GetGuiObjectsAtPosition(Mouse.X, Mouse.Y) method.

2 Likes

Thanks for telling me! I did not know!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.