Ignore jump button and joystick when mobile touch event has made

Hi,

I have some problem when creating a mobile input interactions. When I hold my screen in mobile, it destroys a part in the mouse.target. However, if I hold the jump button or the joystick,
The game thinks im targetting the mouse position behind those buttons causing to destroy the part.

game:GetService("UserInputService").TouchStarted:Connect(function(input)
	mouse.Target:Destroy()
end)

I know my question is very hard to understand due to my english, but I’ll simplify the problem.
Basically when you touch jump button or joystick, the mouse targets that position causing the destroy the part behind it.

Any response would be appreciated.

1 Like