GuiObject.MouseWheelForward for mobile

im trying to make a system where it detects if the player has swiped horizontally on a gui object and if it does then it adds onto a number, but the problem is that it does not work on mobile, and i knew that was going to happen but i dont think there is a direct solution, thats why i havent found it anywhere heres my script currently:

local Num = 1

script.Parent.MouseWheelBackward:Connect(function()

	if Cooldown == false then
		Cooldown = true

		Num += 1

		wait(.5)

		Cooldown = false

	end
end)

script.Parent.MouseWheelForward:Connect(function()

	if Cooldown == false then
		Cooldown = true

		Num -= 1

		wait(.5)

		Cooldown = false

	end
end)

any help will be appreciated

Look into the event listed above

2 Likes

im looking into it right now, thanks

thanks to @SomeFedoraGuy heres the script:

Uis.TouchSwipe:Connect(function(Direction, Touches, GPE)

	if Direction == Enum.SwipeDirection.Left then

		-- swiped to the left

	elseif Direction == Enum.SwipeDirection.Right then

		-- swiped to the right

	end

end)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.