Did Roblox break gamepad UserInputService:GetGamepadState?

Using UserInputService:GetGamepadState to iterate the gamepad state suddenly stopped working correctly.

  1. The Begin event for button presses is never set anymore when you iterate the gamepad state using UserInputService:GetGamepadState (it still works if you use the ContextAction service to connect the callback).

  2. If you use UserInputService:GetGamepadState then thumbstick movement is also not detected, the Position field is always (0,0,0).

Anyone has any info on this?

local States = UserInputService:GetGamepadState(Enum.UserInputType.Gamepad1)
for _,IterState in pairs(States) do

	if IterState.KeyCode == Enum.KeyCode.Thumbstick1 or IterState.KeyCode == Enum.KeyCode.Thumbstick2 then
		local Pos = IterState.Position // THIS IS ALWAYS ZERO! IT WORKED A MONTH OR TWO AGO!
	end

end 
1 Like

I think you need to add a InputBegan function for it to run

1 Like

It started working after I reset my PC, strange, thanks for the help anyway.