PcoWSkbVqDnWTu_dm2ix
The Developer Hub is now deprecated and information on this page may no longer be accurate. To see our new and improved documentation, please click here. You can read more about the future of documentation here.
Collapse Sidebar

ModalEnabled

UserInputService

bool

ModalEnabled property determines whether character controls are hidden on UserInputService/TouchEnabled|TouchEnabled devices. By default, this property is false and controls are visible.

ModalEnabled = false

ModalEnabled = true

This property will only work when used in a LocalScript running for the player whose character controls are to be hidden.

Even if mobile controls are hidden for a player on a mobile device, other UserInputService events such as UserInputService/InputBegan and UserInputService/TouchSwipe can still be used to process other forms of user input on mobile devices with an enabled touch screen (see the main UserInputService class page for a full list).


Code Samples


UserInputService.ModalEnabled

This example toggles between hiding and showing the user’s Roblox mobile controls every 5 seconds.