Mouse.Target and Player Interaction

In my game, specifically my build system, I use mouse.target to figure out where the player taps, and position the objects there. However, on mobile, when they click on UI, the mouse.target still moves, causing the build to go to places not intended. Is there a way to make sure that it only registers mouse.target moving when I don’t click on UI?

You probably want to use UserInputService.TouchTapInWorld for mobile input. The documentation shows example code

2 Likes