Aprender
Clase de motor
GamepadService
No creable
Servicio
No replicado

*Este contenido se traduce usando la IA (Beta) y puede contener errores. Para ver esta página en inglés, haz clic en aquí.


Resumen
Miembros heredados

Referencia API
Propiedades
GamepadCursorEnabled
Seguridad de scripts Roblox
Leer paralelo
Capacidades: Input
GamepadService.GamepadCursorEnabled:boolean
Muestras de código
Propiedad GamepadCursorEnabled - GamepadService
local gamepadService = game.GamepadService
gamepadService:GetPropertyChangedSignal("GamepadCursorEnabled"):Connect(function()
local enabled = gamepadService.GamepadCursorEnabled
if enabled then
-- Código personalizado cuando el cursor virtual está habilitado
else
-- Código personalizado cuando el cursor virtual está deshabilitado
end
end)

Métodos
DisableGamepadCursor
Capacidades: Input
GamepadService:DisableGamepadCursor():()
Devuelve
()
Muestras de código
ServicioGamepad - Deshabilitar Cursor de Gamepad
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
Capacidades: Input
GamepadService:EnableGamepadCursor(guiObject:Instance):()
Parámetros
guiObject:Instance
Devuelve
()
Muestras de código
ServicioGamepad - Activar Cursor de Gamepad
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)

©2026 Roblox Corporation. Roblox, el logotipo de Roblox y "Powering Imagination" son algunas de nuestras marcas registradas y no registradas en los Estados Unidos y otros países.