How to get the touch Dpad for mobile?

Hi! I’m trying to make my game mobile compatible and I’m using the Dpad and I’m using scripts that affects the movement of the player and I’ve tried using input.Keycode == Enum.Keycode.DPadUp or something and I believe it thinks it’s referring to the Physical Controller’s DPad instead of the mobile dpad. How can I access the mobile DPad?

1 Like

The mobile thumbstick by default will modify the Humanoid’s MoveDirection which should allow you to access the mobile (and console) joystick positions without using UserInputService (which lacks a method for accessing the mobile joystick or any mobile controls for that matter).

Yes, but I’m using the built in DPad, not the mobile thumbstick. Sorry that I said it unclear, but I want to know how to detect the button’s mobile DPad has been pressed.

It should still be the same thing, although you’ll need to have a look and see what the values are when certain buttons are pressed.