Detecting Gamepads

作者: jaycex2020 | 来源:发表于2022-02-09 14:51 被阅读0次

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)

相关文章

网友评论

    本文标题:Detecting Gamepads

    本文链接:https://www.haomeiwen.com/subject/frbwkrtx.html