Is there a good way to ignore the mobile thumbpad on a gun script? When I shoot while moving it shoots at where your thumb is on the thumbpad. I use mouse.hit.p right now but if there’s something else I can use to ignore position input from the thumbpad I’ll go with that.
Try this, it might get you a different, more wanted output.
http://wiki-origin.roblox.com/index.php?title=API:Class/UserInputService/GetMouseLocation
Also, if users tap the thumbpad rather than swipe it that might be just a problem of how people use the controls
Rather that using the mouse, try following the code sample for TouchTapInWorld: UserInputService | Documentation - Roblox Creator Hub
You can use the worldPosition instead of mouse.Hit.
Sorry to bump this topic but this issue has plagued my gun systems for a long time and I just now found a fix for it. Using the UserInputService event TouchTapInWorld (like @Mystyle48 said above) you can register screen taps from mobile devices, and with a little bit of code you can get the 3d world mouse position as well. The most relevant code I got from the developer hub article in the link above, but I’ve put together an uncopylocked testing place to show that it works.
Join that game with a mobile device and tap the screen to add blocks where your mouse clicks. The Gui button at the top of the screen allows you to switch between the two listening methods, and you’ll see that when you switch it over to the TouchTapInWorld method it gets accurate positions every time, and never places blocks based on your thumb pad’s position like the Mouse.Hit method does.
Initially the event gives you a vector 2 screen position, but the simple code in the game converts it to a 3d position using raycasting.