I’m trying to use the TouchPan event, however I can’t seem to get it to work on the emulator. I don’t have easy access to touch devices, nor do I wanna have to publish the game, open it on my phone, try to tediously open the console on a small screen and read errors/etc.
Repro:
local UserInputService = game:GetService("UserInputService")
local function Pan(touchPositions, totalTranslation, velocity, state, GPE)
print("Panning")
end
UserInputService.TouchPan:Connect(Pan)
Using any of the touch based emulators (mobile or tablet) cause no result or print. Would be nice to have clicking recognised on touched based devices on the emulator as touch, and not click
Same issue here with this similar code:
(it works on actual mobile device, but not on the emulator in Roblox Studio)
local ThumbButton = script.Parent
local function onThumbButtonTouchPan(touchPositions, totalTranslation, velocity, state)
print(“------”)
end
ThumbButton.TouchPan:Connect(onThumbButtonTouchPan)
I’m going to bump this topic again. This report was made almost a year ago (bar a week). What’s the point in having a mobile emulator when it doesn’t mimic touch?
We have a feature coming in early 2024 to add multi-touch support to the Studio emulator, this will be resolved then. If you have any questions just let us know. Thanks again!