Issue
When a player scrolls on a ScrollingFrame, the UserInputService.TouchPan gameProcessedEvent returns false, even though it should return true in this and many other cases.
This issue causes problems when scripting systems like a custom camera for a build mode, as it makes the camera move unintentionally while the user is just trying to scroll through the build mode UI to select an item to place.
System Information
This issue happens on the Roblox Studio Emulator, but also on my S24 Ultra (and probably on other touch devices).
Impacted Game
My game, My Prison, is impacted by this issue in the “Build Mode Camera”.
I’m even getting negative feedback due to this issue:
![]()
Demo
Demo Context
In the video, I’ll compare the gameProcessedEvent value on TouchPan and TouchTap with this code:
-
For
TouchTap(I’m not using this event in My Prison, I added this print to compare thegameProcessedEventbehavior betweenTouchTapandTouchPan):UserInputService.TouchTap:Connect(function(touchPositions, gameProcessedEvent) print("TouchTap: gameProcessedEvent = ", gameProcessedEvent) end) -
For
TouchPan(the function used to move the build mode camera in My Prison):UserInputService.TouchPan:Connect( function(touchPositions, totalTranslation, velocity, state, gameProcessedEvent) print("TouchPan: gameProcessedEvent = ", gameProcessedEvent) if state == Enum.UserInputState.Begin then lastTouchTranslation = Vector2.new() end --Check if the camera is not locked and if not gameProcessed if not gameProcessedEvent and not BuildCamera.Locked then --Check if is a change and if touch pan ended if state == Enum.UserInputState.Change then --or state == Enum.UserInputState.End then local difference = totalTranslation - lastTouchTranslation --Determinate the difference --Store the move in a Vector3 and add the good speed local move = -Vector3.new(difference.X, 0, difference.Y) * MOBILE_MOVE_SPEED --Apply the camera move ApplyNextMove(move) end end --Update the lastTouchTranslation lastTouchTranslation = totalTranslation end )
Of course, the build mode scrolling frame is set to ScrollingFrame.Active = true.
Demo Videos
- Build Mode Scrolling Frame: When I scroll on the canvas, the
TouchPangameProcessedEventisfalse, but when I tap on the canvas, theTouchTapgameProcessedEventistrue.
- Clicking on Buttons: When I pan on the buttons, the
TouchPangameProcessedEventisfalse, but when I tap on the buttons, theTouchTapgameProcessedEventistrue.
- Roblox Chat: When I scroll on the chat canvas, the
TouchPangameProcessedEventisfalse, but when I tap on the chat canvas, theTouchTapgameProcessedEventistrue.
- Roblox Menu: The only time I noticed the
TouchPangameProcessedEventreturningtrueis when scrolling in the Roblox menu.
Similar issue in the past
This issue is similar to a previous one regarding the TouchTap event (which is now resolved, but it might help fix the TouchPan issue): UserInputService.TouchTap gameProcessedEvent Always False
Expected behavior
When TouchPan happend in a UI handled by the engine like Button Press or Canva Scroll, I expect gameProcessedEvent to be false.
