local UserInputService = game:GetService("UserInputService")
if UserInputService.TouchEnabled then
print("Player is on a Mobile Device.")
else
print("Player is on a Computer or Xbox.")
end
Player.DeviceType only inside the corescript so you cant access to it
Why would you do that though? Your game should be able to adapt to diverse input types. If I am playing on a laptop I should be able to connect a controller and play with the controller. Likewise, if I have something like a Microsoft Surface laptop (or any other with touchscreen), I should be able to touch the screen and have the game adapt to the diversity of the input types. Some tablets are also literally becoming laptops, so for players that might like playing on one with their keyboard hooked up should be able to use keyboard controls.
I don’t see a use for this, just say they are on mobile. Why would any player need to know if another player is on phone or tablet? You could look into screen dimensions but that can be inaccurate.
If your issue is scaling than like @sjr04 stated your games UI should be able to adapt to it.