Collapse Sidebar


This function returns an array of gamepad Enum/UserInputType|UserInputTypes that are connected and enabled for GUI navigation. This list is in descending order of priority, meaning it can be iterated over to determine which gamepad should have navigation control.

Whether a connected gamepad is a navigation gamepad only determines which gamepad(s) control the navigation GUIs. This does not influence navigation controls.

Since UserInputService is client-side only, this function can only be used in a LocalScript.

See also

  • UserInputService/SetNavigationGamepad, to enable or disable a gamepad for GUI navigation
  • UserInputService/IsNavigationGamepad, to verify if a gamepad is enabled for GUI navigation
  • UserInputService/GetConnectedGamepads, to return all gamepads connected regardless of GUI navigational control


Return Type Summary

An array of UserInputType|UserInputTypes that can be used for GUI navigation, in descending order of priority

Code Samples

How to Use the Right Gamepad for Input

The following code sample is used in the default gamepad script, so if you are using the default controls you do not need to worry about this. If you are creating a custom script for handling gamepad controls, this is a good template for retrieving which Enum/UserInputType|gamepad enum you should use as the primary gamepad controller.

This code looks for the lowest numbered UserInputService/GetNavigationGamepad|navigation gamepad, and if no navigation gamepad is found, finds the lowest numbered UserInputService/GetConnectedGamepad|connected gamepad. If there is no connected gamepad, we default to gamepad1. This ensures at least some gamepad will be able to do controls.