Enum.UserInputType.Touch problem

Whenever I move the camera in mobile and hover over a button it fires the function, example:

Is there a TouchStarted event for mobile devices?

No, it’s just InputBegan for Enum.UserInputType.Touch…

Would be helpful if you post the code that you are having an issue with. We cannot help you by arbitrarily guessing at what you might have written.

Ok here you go

SlotUI.InputBegan:Connect(function(input, gameProcessedEvent)

			if input.UserInputType == Enum.UserInputType.MouseButton1 and not gameProcessedEvent or input.UserInputType == Enum.UserInputType.Touch and not gameProcessedEvent then
				
				
				
				if SelectedUI.Parent == SlotUI then

					SelectedUI.Parent = Hotbar

					SelectedUI.Enabled = false

					Player.Character:FindFirstChildWhichIsA("Humanoid"):UnequipTools()

				else
					
					SelectedUI.Enabled = true

					SelectedUI.Parent = SlotUI

					Player.Character:FindFirstChildWhichIsA("Humanoid"):EquipTool(Item)

				end

			end
		end)