Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

How to remove mobile controls?

Asked by 9 years ago

I'm adding mobile support to my game, and I've found that none of the mobile input options seem suitable for my game. My friend has made some guis that we were going to use instead of the default ones, but we now need to remove the default mobile input thumbsticks. Is there a way to do this?

2 answers

Log in to vote
5
Answered by
woodengop 1134 Moderation Voter
9 years ago

According to the Roblox Wiki you would use the ModalEnabled ,if this is set to truethen it disables the controls, the default is false, Example.

game:GetService("UserInputService").ModalEnabled=true
Ad
Log in to vote
3
Answered by
Goulstem 8144 Badge of Merit Moderation Voter Administrator Community Moderator
9 years ago

You can set whether or not the mobile controls are visible to the client with the ModalEnabled property of UserInputService. When this property is set to true, mobile users that join your game will not be able to see the core controls interface. This property is defaulted false.


--NOTE--

This property, as well as any other member of the Roblox API that is a part of UserInputService, can not be used in a server script. It can only be used in a localscript.


Example;

local uis = game:GetService('UserInputService')

uis.ModalEnabled = true --Setting to true will disable the UI(:

Answer this question