Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

UserInputService not firing/running.. at all?

Asked by 5 years ago

I've recently run into a problem, I don't know what in the world is the problem, but I'm guessing it's a Roblox side error.

I've tried many different techniques to get the input, all of which resulting in nothing. -No output.. -No action.

Is this something just 'going-around' in Roblox, or what? Past scripts that did work (even just a few days ago), aren't working. What's up with this?

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

Hello! I'm BlackOrange3343 and I'll be helping you today.

I'm not sure why there is a "sudden" malfunction in your script that worked a while ago but let me suggest a couple things.

  1. UserInputService should be done on the Client. (Local Script)
  2. Your local script should be in a place that will let the local script run. A few examples are StarterGui, StarterCharacterScripts,StarterPlayerScripts.
  3. Make sure the script is not Disabled

After you made sure all these are done and still doesn't function then:

Add a new LocalScript into StarterGui.

Next copy paste this:

local UIS = game:GetService('UserInputService')

UIS.InputBegan:Connect(function(Input, IsTyping)
    if Input.KeyCode == Enum.KeyCode.F then
        print('F has been pressed')
    end
end)

If it prints then it means it works, then you can edit the script from there to your likings.

Hopfully this helped.

Best of luck developer!

PS: If it errors comment and tell me

Ad

Answer this question