GamepadService
Show Deprecated
Summary
Properties
Methods
Properties
GamepadCursorEnabled
Code Samples
GamepadService - Gamepad Cursor Enabled Property
local gamepadService = game.GamepadService
gamepadService:GetPropertyChangedSignal("GamepadCursorEnabled"):Connect(function()
local enabled = gamepadService.GamepadCursorEnabled
if enabled then
-- Custom code when the virtual cursor is enabled
else
-- Custom code when the virtual cursor is disabled
end
end)
Methods
DisableGamepadCursor
()
Returns
()
Code Samples
GamepadService - Disable Gamepad Cursor
local gamepadService = game.GamepadService
local userInputService = game.UserInputService
userInputService.InputBegan:Connect(function(inputObject, gameProcessed)
if inputObject.KeyCode == Enum.KeyCode.ButtonB then
gamepadService:DisableGamepadCursor()
end
end)
EnableGamepadCursor
()
Parameters
Default Value: ""
Returns
()
Code Samples
GamepadService - Enable Gamepad Cursor
local gamepadService = game.GamepadService
local userInputService = game.UserInputService
local startObject = script.Parent
userInputService.InputBegan:Connect(function(inputObject, gameProcessed)
if inputObject.KeyCode == Enum.KeyCode.ButtonA then
gamepadService:EnableGamepadCursor(startObject)
end
end)