How to fix guns for mobile devices?

I found that using guns is really hard to use on mobile. For example, when walking and aiming, sometimes the gun aims at the mobile movepad instead.

Any tips to fix this?

2 Likes

I usually play games on mobile and most shooting games that are mobile compatible have the same problem. The most you could do is add a gun aiming thingy that points and shoots in one direction.

Presuming you’re on avout FPS, make double click shoot or somthing.

If not, what add something else which you can shoot with but move without colliding.

1 Like

Tap to hold is very annoying on mobile devices. LongPressTap takes a bit too long to use for a gun.

The solution to avoid players shooting when moving or clicking any UI Elements is to use TouchTapInWorld which has two arguments in its parameter, a Vector2 position and an argument which is for checking whether the player is Tapping on UI or not.

The annoying part is that if your guns are automatic, if the player has to hold his press the TouchTapInWorld will not fire.

Hey there! I’ve created a simple script that showcases a fix to the same problem you’re experiencing. You can find the script below. I’ve also included some helpful comments within the script.

Hope it fixes your issue!
mobile.rbxl (56.7 KB)

I’m so sorry for the late response lol, I will fix it.