Enum.UserInputType.Touch issue

Hello, I’m trying to create a football, but whenever a mobile user tries to rotate their camera it makes them throw the ball.


UserInputService.InputBegan:connect(function(InputObject, GameProcessedEvent)
	local UserInputType = InputObject.UserInputType
	local KeyCode = InputObject.KeyCode
	if (GameProcessedEvent or _G.Typing) then
		return
	end
	if (UserInputType == Enum.UserInputType.MouseButton1) or (UserInputType == Enum.UserInputType.Touch) then
		if player.Character:findFirstChild("Football") and humanoid.WalkSpeed>0 then
			if player.Character.Football:findFirstChild("Fire") then
				print("ClientThrow");
				PlayAnim("Throw");
				player.Character.Football.Fire:FireServer("Throw",(mouse.Hit.p-game.Players.LocalPlayer.Character.Head.Position).unit,power);
			end
		else
			Act:FireServer("Catch")
		end

Could you please send a LocalFile or send the whole LocalScript/Script?

Is _G.Typing meant to check if they are currently typing in the chat or in a UI?
If so, that is a part of gameProcessed.

I suggest you use the ContextActionService and make it create a button for mobile users. If the user is on mobile after they click the button, detect where they next click and go from there.