BindAction not working for specific buttons

So basically, I have a local script that listens to controls from both keyboard and controller using BindAction with ContextActionService. This worked perfectly when I was only listening to these actions:

ContextActionService:BindAction('Left', onLeft, true, 'a', Enum.KeyCode.Left, Enum.KeyCode.DPadLeft)
ContextActionService:BindAction('Right', onRight, true, 'd', Enum.KeyCode.Right, Enum.KeyCode.DPadRight)
ContextActionService:BindAction('Up', onUp, true, 'w', Enum.KeyCode.Up, Enum.KeyCode.DPadUp)
ContextActionService:BindAction('Down', onDown, true, 's', Enum.KeyCode.Down, Enum.KeyCode.DPadDown)
ContextActionService:BindAction('Shield', onShield, true, 'i', Enum.KeyCode.ButtonR2, Enum.KeyCode.ButtonL2)
ContextActionService:BindAction('Jump', onJump, true, Enum.KeyCode.Space, Enum.KeyCode.ButtonY)
ContextActionService:BindAction('Run', onRun, true, Enum.KeyCode.LeftShift, Enum.KeyCode.ButtonR3)
ContextActionService:BindAction('Attack', onAttack, true, 'j', Enum.KeyCode.ButtonB)

It stopped working, though, once I created these extra actions and changed the controller button for attacking:

ContextActionService:BindAction('Attack', onAttack, true, 'j', Enum.KeyCode.ButtonA)
ContextActionService:BindAction('Strong', onStrong, true, 'k', Enum.KeyCode.ButtonB)
ContextActionService:BindAction('Special', onSpecial, true, 'l', Enum.KeyCode.ButtonX)

When I made these changes, a few things became much less consistent: attacking with SPECIFICALLY the A button on controller, and jumping with the space bar. Jumping would still work with the controller, and attacking would work on keyboard, but not on the other. I know it has nothing to do with the other code because of how I’m handling these actions:

local function onAttack(actionName, inputState)
	print("Butto adw")
	--code
end

When using the A button on controller, the “Butto adw” doesn’t print. However, if i switch the button for attacking to the B button, it works every time. I’ve also tried other controllers (including one I just got today, brand new) and nothing. The weirdest part, however, is the consistency. Space bar almost never works in studio, however it almost always works in player. Attacking with controller never works in studio, and almost never works in player. I have tried splitting the script into 2 separate scripts, but that didn’t help. This is a very confusing problem. What should I do?

This is my first post, so apologies if I messed anything up or if I wasn’t clear enough.