Issues with gamepad inputs

My inputs for my gamepads aren’t detecting from what it seems, the prints aren’t appearing in the outputs.

Below is the gamepad section of my script (not the whole script):

UIS.InputBegan:Connect(function(input, gameProcessedEvent)
	if gameProcessedEvent then return end
	
	if input.UserInputType == Enum.UserInputType.Gamepad1 then
	if input.KeyCode == Enum.KeyCode.ButtonA then
		if not holdingKey and canWallclimb and wallrunCount < maxWallruns then
			holdingKey = true

			-- Reset wallclimb variables
			wallrunTimer = 0
			canWallclimb = false
			print('ButtonA found')

			-- Store the original walk speed
			originalWalkSpeed = c.Humanoid.WalkSpeed
			
			end
		end
	end
end)

UIS.InputEnded:Connect(function(input, gameProcessedEvent)
	if gameProcessedEvent then return end
	
	if input.UserInputType == Enum.UserInputType.Gamepad1 then
		if input.KeyCode == Enum.KeyCode.ButtonA then
			holdingKey = false
			print('ButtonA not found')
		end
	end
end)

For some reason, GameProcessed will always be true for ButtonA. I encountered this problem as well a while ago.

-- Fix for this
if gameProcessedEvent and (input.KeyCode ~= Enum.KeyCode.ButtonA) then return end
1 Like

Thank you,

It’s probably because you can already jump with ButtonA even it nothing is implemented for it.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.