Gonna give back true if a user is on a touch-screen device, so not reliable.
Ideally you should not be coding for a specific platform but instead make your code adapt to different inputs. For instance if I wanted to play a game on Roblox with controller and then later on I decide I don’t want to anymore, I don’t want to be treated as an Xbox player anymore. I want to be treated as a computer user.
You don’t detect if a device is mobile or not, there’s no accurate way to do it. You have to actively set the text depending on the player’s active input source. If the player used touch, change the text to “Tap”, otherwise “Click”.
If your goal is to detect a mobile device, checking if they have a keyboard is not accurate because some windows tablets can come with keyboards. If the player had both touchscreen and keyboard, how would you determine if it’s mobile now? It leads to false positives.
I recommend using UserInputService | Documentation - Roblox Creator Hub, as it may change depending on if someone, for instance, plugs in a controller.etc. I think this is what Whatever Floats Your Boat uses, pardon me if I’m wrong.
You can solve this problem using the previously mentioned API to check changes throughout play. LastInputType. You can use it one time, or listen for changes on this, and adjust your UI accordingly.
This will solve this problem. It has an event for if it changes here