ContextActionService not detecting controller inputs

I am doing a menu which is supposed to be controller compatible. This being said, I have this code at the moment:


local function ControllerChoice(actionName, inputState, input)
	local obj = SelectedVal.Value
	print(inputState, input.KeyCode)
	if ActiveValue.Value == Frame and inputState == Enum.UserInputState.Begin then
		if LockedObject.Value == obj then
			module.UnChoice()
		else
			module.Choice(obj)
		end
	end
end

ContextActionService:BindActionAtPriority("SelectInicial", ControllerChoice, false,1, Enum.KeyCode.Return, Enum.KeyCode.Space,Enum.KeyCode.ButtonA)

While this method has been working out for me, as the service has been able do detect DPad inputs, it is not detecting this ButtonA one. Any ideas on how I can fix this issue?

Edit1: Forgot to add, nothing is being printed when I use the controller button and works with keyboard buttons. Also, no errors.

Edit2: After some investigation, discovered it is only not dettecting the ButtonA, as it is working with ButtonB.