PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

SetNavigationGamepad

The SetNavigationGamepad sets whether or not the specified Enum/UserInputType Gamepad is allowed to move the GUI navigator around. A gamepad that is allowed to move the GUI navigator is considered a navigation gamepad.

If the enabled argument is passed as true, the Gamepad is allowed to move the GUI navigator. If the argument is false, the Gamepad is not allowed to move the GUI navigator.

If you want to check if a specified Gamepad is a set to be a navigation gamepad, you can use the UserInputService/IsNavigationGamepad function. You can also use the UserInputService/GetNavigationGamepads to retrieve a list of all navigation gamepads.

Since UserInputService only runs client-side, this function will only work when used in a LocalScript.

Parameters

Name Type Default Description

The specified gamepad.

A boolean indicating whether the specified Gamepad is allowed to move the GUI navigator around.

Returns

Return Type Summary

No return.


Code Samples


UserInputService:SetNavigationGamepad

This example sets the UserInputType.Keyboard as a navigation gamepad by passing UserInputType.Keyboard and true as arguments.

local UserInputService = game:GetService("UserInputService")

UserInputService:SetNavigationGamepad(UserInputType.Keyboard, true)