Collapse Sidebar




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


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