How to ignore thumbstick on mobile

How can i ignore thumbstick?

2 Likes

If you’re using UserInputService just check at the top of the function:

if GameProccessedEvent then return end

GameProccessedEvent is the second Parameter in InuptBegan, InputEnded, and InputChanged

1 Like

I need fully ignore thumbstick because its following the mouse

1 Like

That should still work I think

1 Like

This laser two side based, client and server. client-side cant see server, server side cant side client side

1 Like

Are you using UserInputService?

1 Like

No but i can use it too if necessary, i am using player mouse

1 Like

How are you using the mouse on mobile? :thinking:

1 Like

I tried touchpad position but not working properly, and i just need to ignore thumbstick to working properly with mouse.hit.p

1 Like

A hacky way to do it with moues would to be to cross check the location of the mouse with the mobile UI’s [ThumbstickEnd] and then ignore any input that overlaps

image

local mouse = game.Players.LocalPlayer:GetMouse()
local touchstickEnd = game.Players.LocalPlayer.PlayerGui
	:WaitForChild('TouchGui')
	:WaitForChild('TouchControlFrame')
	:WaitForChild('DynamicThumbstickFrame')
	:WaitForChild('ThumbstickEnd') :: ImageLabel

if math.abs((mouse.X - touchstickEnd.AbsolutePosition.X)) < 25 or math.abs((mouse.Y - touchstickEnd.AbsolutePosition.Y)) < 25 then
	print('Too Close')
else
	print('do stuff')
end
5 Likes