How do I add xbox controls?

So I’m making a 2D game with a friend. We have a settings button to toggle music on and off and reset data as seen in the picture below

Right now Im trying to figure out how to add xbox controls like TOH (Tower Of Hell) could someone help me with this? Thanks in advance!

2 Likes

I haven’t learnt much about this, but you can use the UserInputService Service to check if a player has a Gamepad or not

You could also refer to this if it helps:

3 Likes

You would be required to make a script that loops through the all the gui buttons and assign a specific gamepad input to it. Example: Enum.KeyCode.ButtonX (Which assigns it to the “X” button on the xbox controller). After assigning, you can make a table of functions to toggle the UI and call the function needed according to the input.

(Also make sure to only run this if the player is on Xbox, refer to @JackscarIitt 's reply for how to do it)

7 Likes