TouchEnabled not working on my Touch Screen Computer!

As my game uses keys to control actions, I have created buttons on my GUIs that appear when UserInputService.TouchEnabled is true.
Except, I’m testing this on my Microsoft Surface Pro 7, which has a touchscreen and detachable keyboard.
It doesn’t matter whether the keyboard is connected or not, the output to the test is always:
image
WHEN IT DOES!
Can anyone help fix this, because if I was to use it without the keyboard there would be no way to play my game right now.

Thanks in advance.

TouchEnabled is always a bad choice for detection as it may not provide accurate results. Unfortunately roblox is very limited with these functions so I suggest you utilize GetLastInputType to detect inputs.

1 Like

I don’t think laptop touchscreens are identified as a “touchscreen” as how Roblox would identify it. It would only sends click events.

I’ll try using GetLastInputType, but I think ROBLOX need to update their touchscreen detection or deprecate that function, because right now this could be a massive issue for some players