UserInputService.InputBegan not firing

My problem is that UserInputService.InputBegan is not firing.

I have a local script that says:

game:GetService('UserInputService').InputBegan:Connect(function(io)
	print('input detected')
	print(io.UserInputType.Name)
end)

Nothing’s printing. I tried pressing a bunch of keys. I tried clicking. I tried rolling the mouse wheel. I tried restarting Studio. I tried changing the position and size of the output window (which I obviously didn’t expect to work, but I felt like it was worth a try).

Maybe it is firing, and there’s just something wrong with my code.

Is this in StarterPlayerScript and a LocalScript? Also, make sure you have the second parameter, gameProcessed which is a Boolean to ensure its not firing while the player is typing in a chatbox. When its true that means theyre typing/ generally doing something that you shouldnt fire in that case, when its false you should continue.

1 Like