of     1   

Ceranity
#184547251Monday, February 29, 2016 8:41 PM GMT

I've got a game which requires the R key to be pressed in order for something to happen, but since I want it to be tablet friendly, I was wondering if it is possible for the game to check if the player is on mobile, then make a GUI (which is not visible on PC) show up so tablet users can press that instead of the R key. I can't find anything which allows me to do this. I don't know if it is possible to make a script to check if the player is playing on a PC or not. Does anyone know if this is possible?
benthanh123
#184547286Monday, February 29, 2016 8:42 PM GMT

Ceranity
#184547313Monday, February 29, 2016 8:43 PM GMT

Damn. This is completely new to me. Is anybody an expert?
Ptwisted
#184547718Monday, February 29, 2016 8:52 PM GMT

http://wiki.roblox.com/index.php?title=Making_a_2D_Platformer ^ This tutorial is a good reference to implementing ContextActionService.
supremebloxboy
#184548301Monday, February 29, 2016 9:05 PM GMT

local UserInputService = game:GetService("UserInputService") if UserInputService.TouchEnabled == true then --Checks if mobile --If yes then runs code here end put in local script then put the local script in StarterPlayer->StarterPlayerScripts
Ceranity
#184549042Monday, February 29, 2016 9:21 PM GMT

Thanks, I'll try this out. And thanks to everyone as it'll help me learn how to do this for the future.

    of     1