Hello, i would like to know if it is possible to detect if the user is on tablet or phone.
Even tough this topic has been discused a lot of time, i did not find anything concret so i made this post.
Thanks.
Hello, i would like to know if it is possible to detect if the user is on tablet or phone.
Even tough this topic has been discused a lot of time, i did not find anything concret so i made this post.
Thanks.
There has been a lot of topics about this, you may check them out. One of them have a solution, here. How do I detect if a user is on mobile?
Just below they stat that there are maybe window devices which a 100% touch screen and i’ve read in another post that android supports keyboards.
It is true that Android devices supports keyboards but hope the post above helps a lot.
Using it only resolve a part of the question because i would still not know if it is a tablet or phone.
There are already many posts/threads about this topic, please search before making a new post.
As i stated in my post, i’ve done research about it but still haven got any solide conclusion on distinguising the two.
local ismobile = game:GetService('UserInputService').TouchEnabled
local isdesktop = game:GetService('UserInputService').KeyboardEnabled
if ismobile == true then
-- Put your own code here for Mobile
elseif isdesktop == true then
-- Put your own code here for desktop
end
In my case it is not crucial of having it perfect so i will use something in that direction. I was looking for maybe something more precise but it will go.