Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why will user input service not function?

I am attempting to print something upon any key being pressed with the user input service.

Why does this code not work at all?

local userInputService = game:GetService("UserInputService")

userInputService.InputBegan:Connect (function(input, gameProcessedEvent)
	
	print("1")
	
end)

1 answer

✓ Accepted answer

Simple Fix! You have everything right, but you misplaced the script.

To fix this, simply put the script in

game.StarterPlayer.StarterPlayerScripts and make sure its a local script.

Here is what I mean:

https://prnt.sc/tcva9j

Just like that :)

This discussion is preserved as it was. New answers, comments, and votes are closed.