ContextActionService not detecting begin of input state for the I key

ContextActionService:BindAction(“RequestBomb”, function(_, inputState)
warn(inputState)
if inputState == Enum.UserInputState.Begin then
doRequestBomb()
end
end, false, Enum.KeyCode.I, Enum.KeyCode.ButtonX)

When I run the game in studio and press I 20 times, it will only print " Enum.UserInputState.End" once. If i publish the game and run it, it works fine and the console shows Enum.UserInputState.Begin and Enum.UserInputState.End as it should
Also, I haven’t changed anything with this script or my input system, it suddenly stopped working.

Hi,

Thanks for the report.

It seems to be a duplicate of an existing post: "I" and "O" are being sunk / not detected by scripts

If you turn off the setting “Respect Studio Shortcuts when game has focus”, you should be able to make it work in Studio as well. Can you please try that?

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