ContextActionService F key not working?

Ok so currently, I’m trying to make it so that if you press the F on your keyboard, the flaps on the plane will change to the next position. For some reason, if I use Enum.KeyCode.Z it’ll work perfectly fine, but if I were to change it to Enum.KeyCode.F then it will run as soon as the script is ran, and never fire again.

It also never errors, just stops working.

local function updateFlaps(actionName, inputState, inputObj)
	print('flaps')
	if inputState == Enum.UserInputState.Begin then
		flapsPosition = flapsPosition + 1
		if flapsPosition > #flapsTable then
			flapsPosition = 1
		end
	end
end
cas:BindAction("UpdateFlaps", updateFlaps, false, Enum.KeyCode.Z) --Problem here

There’s nowhere else that it binds over it or the button so I’m entirely lost.

1 Like

it’s working completely fine for me.

I would say that the issue is somewhere here. Verify that your logic is correct.

2 Likes

Figured out I wrote over it a completely different script that had no prints

oops

Requested by topic creator as issue was resolved.