# This file is automatically generated. Please don't edit it manually. # To submit a bug report on the content, see # https://devforum.roblox.com/c/bug-reports/documentation-issues/72 name: GamepadService type: class memory_category: Instances summary: | The GamepadService is internally responsible for handling inputs from various controllers, such as Xbox One or PlayStation DualShock controllers. description: | The GamepadService is internally responsible for handling inputs from various controllers, such as Xbox One or PlayStation DualShock controllers. It also handles APIs used with the gamepad virtual cursor. You can enable the gamepad cursor for your experience by setting `Enum.VirtualCursorMode` under `Class.StarterGui|StarterGui` to `Enabled`. code_samples: [] inherits: - Instance descendants: [] tags: - NotCreatable - Service - NotReplicated deprecation_message: '' properties: - name: GamepadService.GamepadCursorEnabled summary: | The state of the gamepad virtual cursor. description: | This boolean is a read only variable that maintains the state of the gamepad virtual cursor. You can read this property but not write to it. code_samples: - GamepadService-GamepadCursorEnabled type: boolean tags: [] deprecation_message: '' security: read: None write: RobloxScriptSecurity thread_safety: ReadSafe category: Data serialization: can_load: true can_save: true capabilities: - Input methods: - name: GamepadService:DisableGamepadCursor summary: | Disables the gamepad cursor, if currently enabled. description: | This function disables the gamepad cursor, if it's currently enabled. code_samples: - GamepadService-DisableGamepadCursor parameters: [] returns: - type: () summary: '' tags: [] deprecation_message: '' security: None thread_safety: Unsafe capabilities: - Input - name: GamepadService:EnableGamepadCursor summary: | Enables the gamepad cursor or updates its position. description: | This function enables the gamepad cursor if it's currently disabled. If the cursor is already enabled, calling the API updates the cursor's position. The function accepts a `Class.GuiObject|GuiObject` parameter, but there are some invalid cases. Please note that in order to set the cursor to the default position, `nil` must be passed in as a parameter. Providing no argument will result in an error.
Input GuiObject Cursor Starting Position
Nil Default position
Not a GuiObject Cursor does not appear, errors
Not a child of BasePlayerGui Cursor does not appear, errors
GuiObject has Visible 2 set to false or any parent visible set to false Default position with warning
Child of ScreenGui 1 with Enabled 1 set to false Default position with warning
Child of BillboardGui 4 or SurfaceGui Default position with warning
GuiObject outside the viewport (Or, any part of the gui object that is off screen) Default position with warning
Child of ScrollingFrame with clipping set to false: GuiObject outside of scrolling frame (Object child of scrolling frame and not visible on screen) Default position with warning
Child of ScrollingFrame with clipping set to true: GuiObject outside scrolling frame window but inside viewport GuiObject moves into the scrolling frame and starts the cursor centered over the object
GuiObject inside the frame and visible Cursor starts centered on the GuiObject
code_samples: - GamepadService-EnableGamepadCursor parameters: - name: guiObject type: Instance default: summary: '' returns: - type: () summary: '' tags: [] deprecation_message: '' security: None thread_safety: Unsafe capabilities: - Input events: [] callbacks: []