Mobile gun firing when dragging thes screen, not when clicking only

  1. What do you want to achieve? Keep it simple and clear!

Make gun not fire when moving the screen on mobile.

  1. What is the issue? Include screenshots / videos if possible!

The “Button1Down” event doesn’t recognize dragging.

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?


Code for firing:

	MainModule.ButtonDown(Settings, Clone, Character, Mouse, Camera ) -- this has a module that sets "MouseDown" to true 

	MainModule["MouseDown"] = false


you could make it so if the mouse moves a certain amount after mouse down (player holding finger), it will not shoot since that means the player is dragging their finger. but if the mouse doesn’t move much, it will count as the player not dragging and when the player releases their finger, mouse up, it will shoot.

i hope this makes sense for you (as you can tell i’m not that good at explaining)

I think the easiest method would be to have a fire button
Most of the major mobiles games out there ( cod fornite pugb ) does that

I tried that, but then raycasting doesn’t work (Raycast needs Mouse Position and when you click the button the mouse position is the place where the user has clicked).

If you are going to use a button, it’s probably better to have the crosshair always in the middle.
You can use
Method instead

Fixed the link

Tried, but didn’t really get how it works. Thanks tho, might be helpful, I’ll mess with it a bit more.