So i want to see to detect what the player is using what device like phone,tablet or laptob,computer so we can occur different events.
COMMUNITY QUESTION
How to detect the players device using?
1 answer
I just found out about this randomly, you can use the below code (in a local script):
if UserInputService.KeyboardEnabled then
print("Has a keyboard")
else print("No keyboard Availible")
end
Obviously, if the player has a keyboard, they are on PC. If no keyboard is found, they are using a mobile or xbox device.
But you can also use GamepadEnabled and VREnabled to distinguish non-PC players
1 comment
0
Ya this get problematic when a player connects a controller to a phone/pc or a mouse & keybaord to an xbox/phone; generally you want to avoid scripts in Roblox that require device specific factors; learned this the REALLY hard way :P
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
See if this can help you out: https://devforum.roblox.com/t/how-to-detect-if-player-is-using-a-phone/178533/4