Hello there! My name is Dron and I am a builder. My scripting is bad and I wanted to know how to make a script that shows client’s device above them with surfaceGui. I will read all the replies!
Hello, unfortunately, I do not believe you can get the exact device, although you can find out if the user is on a console by doing GuiService:IsTenFootInterface()
. For mobile devices is it slightly different, you can try checking if UserInputService.TouchEnabled
, UserInputService.KeyboardEnabled
and UserInputService.MouseEnabled
, however this may not be accurate.
Unfortunately there is no official way to find out the exact device. Since the above is sort of “hacky”, I’d only use it for analytics reasons. While the above works, it may be different for devices with different screen sizes, touch screen laptops etc.
Yeah I meant if player using pc/laptop, tablet, console or phone. I saw that in some game. Thank you for answer tho!
Edit: Oh and i think you misspelled the “input” word in script.