Detecting Gamepads
local UserInputService = game:GetService("UserInputService")
if UserInputService.GamepadEnabled then
print("Player has gamepad enabled...")
end
local UserInputService = game:GetService("UserInputService")
UserInputService.GamepadConnected:Connect(function(gamepad)
print("Player has connected controller: " .. tostring(gamepad))
end)
UserInputService.GamepadDisconnected:Connect(function(gamepad)
print("Player has disconnected controller: " .. tostring(gamepad))
end)