Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How could i make this mobile device detected script better?

Asked by
262187 45
8 years ago

I'm making a script that's supposed to detect mobile users, and if a user is on a mobile device then a certain gui wont show up for them.

But i have some questions.

If i use TouchEnabled will it detect only people on mobile device which have touch screens? or will it also detect people who have monitors that are touch screen?

Should i add more to this script so it only detects mobile users?

TouchDevice = game:GetService('UserInputService').TouchEnabled

    if TouchDevice == true then
        print(player.Name.. " has a touch screen, Removing their MessageGUI")
        script.Parent.Parent.Visible = false
        script.Parent.Visible = false
        else

Answer this question