Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Game detects gamepad when it's not connected?

Asked by
Stravan 18
4 years ago

I've been trying to create a system where gamepad icons show up instead of keyboard inputs for GUIs when you have a gamepad enabled. This works mostly, except it only works when you're in game and you happen to plug in a controller. I also want this to happen when you already have a gamepad plugged in, which GamepadEnabled should help with... except it always thinks a gamepad is connected.

if UserInputService.GamepadEnabled then
    print("gamepad enabled!")
    gui.EThing.EFake.Name = "E1"
    gui.EThing.E.Name = "EFake"
    gui.EThing.E1.Name = "E"
end

This fires regardless if I have a gamepad connected or not, what am I doing wrong?

Answer this question