Can you make a mobile detection system in roblox?

Hey Roblox devs. I wanted to know if it’s possible to make some sort of detection system in roblox studio, so like if a mobile player joins the gui changes to fit their screen. How would I achieve this? If there isn’t a mobile detection thing, then am I just going to have to shrink everything until it fits for mobile?

Please let me know the best solution for this. Thanks

2 Likes

Ok, so you don’t need to shrink your ui down to fit the mobile screen.
You can simply use this plugin named “AutoScale Lite”.

As @C0wabunga_Dude states you will need to make sure all your UIs are scaled to fit all devices, not just mobile but tablet and any resolution really. Sometimes you want a UI to appear only for mobile or touch screen, so then you use the method below. But as far as making the UI look good on the resolution of the device, then you should be scaling the UI properly, not necessarily checking for the input signal outlined below.

As fas as detecting if someone is on mobile or any touch screen, you can check if the user is using a touch enabled device. You can read on how to check for this here:

https://developer.roblox.com/en-us/api-reference/property/UserInputService/TouchEnabled