UserInputService.TouchTap gameProcessedEvent Always False

gameProcessedEvent for all UserInputService events is meant to be true if it was processed by the engine, like when pressing an active button. However, TouchTap (and potentially others) is now returning false when InputBegan and InputEnded events are true. This has appeared as a bug in Ultimate Mining Tycoon where touch tap events for buttons are triggering actions since at least November 2nd. Others have mentioned seeing it 2 weeks before, but November 2nd is when the bug appeared.

Example code to use with a LocalScript with the device emulator active:

--!strict

local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")

local ScreenGui = Instance.new("ScreenGui")
ScreenGui.ResetOnSpawn = false
ScreenGui.Parent = Players.LocalPlayer:WaitForChild("PlayerGui")

local TextButton = Instance.new("TextButton")
TextButton.Size = UDim2.new(0, 200, 0, 200)
TextButton.Position = UDim2.new(0, 100, 0, 100)
TextButton.Parent = ScreenGui

UserInputService.InputBegan:Connect(function(Input, GameProcessedEvent)
	--GameProcessedEvent is true when over the button, false otherwise.
	print(`InputBegan: {Input.UserInputType} {GameProcessedEvent}`)
end)

UserInputService.InputEnded:Connect(function(Input, GameProcessedEvent)
	--GameProcessedEvent is true when over the button, false otherwise.
	print(`InputEnded: {Input.UserInputType} {GameProcessedEvent}`)
end)

UserInputService.TouchTap:Connect(function(_, GameProcessedEvent)
	--GameProcessedEvent is always false!
	print(`TouchTap: {GameProcessedEvent}`)
end)

Expected behavior

When a tap is handled by the engine for another event (button press), I expect gameProcessedEvent to be false.

5 Likes

Can confirm it is also the case for TouchPan. :slightly_frowning_face:

Thanks for your patience on this one, there was an optimization for touch gestures a few weeks ago that resulted in significant speedups for processInput, and this looks to be an issue caused by that optimization.

We are actively working on fixing this issue while maintaining those significant improvements, and pushing them further.

As a workaround in the meantime, you can connect to any single gesture signal (i.e. TextButton.TouchTap:Connect(function() end)) on any valid GuiObject within a particular GUI in order to get the gameProcessedEvent values that you’re expecting for any gestures that land over objects within that GUI.

3 Likes

My game, “My Prison”, is also impacted by this issue on TouchPanevent. It causes the build mode camera to move whenever a player scrolls within a ScrollingFrame. I am receiving negative ratings from players whose feedback specifically mentions this bug. Do you have any updates regarding a fix?

A demo of the problem

print("TouchPan", touchPositions, totalTranslation, velocity, state, gameProcessedEvent)

The bad feed back

image

Thanks for the help