I'm learning about Gamepad inputs. The following code is supposed to get the available KeyCodes for the Gamepad2. I do not understand what is happening in lines 3-4. Please explain what these lines do.
local availableInputs = game:GetService("UserInputService"):GetSupportedGamepadKeyCodes(Enum.UserInputType.Gamepad2)
print("This controller supports the following controls:")
for _, control in pairs(availableInputs) do
print(control)
end

2 comments
thanks. what does "control" refer to in the line with the for loop?
It refers to all the controls on the players controller so it loops through the controls and prints their names.