I've tried using game:GetSetting('UserInputService').GamepadEnabled but it doesn't work with my generic gamepad, neither with my PS3 controller. I've tried to use Better DS3 to trick my PC into thinking the PS3 controller is a Xbox 360 one, but it still doesn't work...
COMMUNITY QUESTION
How do i detect a gamepad in my game?
2 answers
Its GetService, not GetSetting
game:GetService('UserInputService').GamepadEnabled
1 comment
0
i can't remember if i do have written GetService or GetSetting, but i'll check it later
Detects when a controller is connected. I use this for my game and it's like a charm.
local UIS = game:GetService("UserInputService")
UIS.GamepadConnected:connect(function(gamepad)
print("Player has plugged in controller: " .. tostring(gamepad))
end)
UIS.GamepadDisconnected:connect(function(gamepad)
print("Player has unplugged in controller: " .. tostring(gamepad))
end)
that will detect when a gamepad is connected and disconnected
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
game:GetService? game doesn't have a function GetSetting() that I see.
woops....