I’ve been trying to map ButtonA on an Xbox controller on a script, and it’s not working. Does anyone know a fix to this?
Is this what you are talking about?
local UserInputService = game:GetService("UserInputService")
UserInputService.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.ButtonA then
--do your thing here.
end
end)
Yes, I already have the input from UIS in the script, but every other button works but ButtonA. I saw another post with this problem but apparently it isn’t something happening to others because that was the only thing I could find talking about it
Are there any errors in the output tab? or have you tried restarting or reinstalling Studio?
It’s okay, I found out the issue
Some buttons fall under game processed events, including ButtonA, so you have to check if it’s a game processed event, and set it to true. Then it should work, which it does!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.