How to show mobile controls?

My game uses a custom control script that so far just listens to WASD keys with UserInputService to move the player.

This has disabled the standard mobile dpad/joystick controls completely, not that they don’t work, they just don’t show up anymore. How can I make mobile controls visible? Also, how can I listen to their input to move the player in my script? Does implementing the latter solve the first question?

1 Like

Is something like this you want? I don’t totally sure what you are asking about.

To my knowledge that only creates buttons for simple actions, and on a touch display only take one input (tap the button).

I need to get the mobile joystick to appear in my game while using a custom ControlScript (it seems having a custom control script disables the touch joystick).

Could the issues be like this post where the joystick is out of bound?

Sorry I am not totally sure if not as I don’t do a ton of mobile stuff.

Within the context of your script, without the actual code of the script it is impossible to determine how re-enabling the mobile controls will effect if users can move or not. So I cannot tell you if enabling the mobile controls will fix it, but setting UserInputService | Roblox Creator Documentation to false will re-enable mobile controls. I am not sure how you’d code your own version of this since I am not great with custom controls, however in game under Players/Player/PlayerScripts/PlayerModule/ControlModule there are modules called TouchThumbstick and DynamicThumbstick that are the default way on how it works, which may be worth looking into.

Also another thing you can do to get the TouchGui (mobile controls), and code your own is to emulate a mobile device on Studio, and then go to PlayerGui and copy the TouchGui

ModalEnabled doesn’t change anything for me. The gui never appears. I will try to copy the modules and make them work with my script.