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

UserInputService not working on key press or any user input?

Asked by
Plieax 66
5 years ago
function onInputBegan(input,gameProcessed)
    print("okwtf")
    if input.Type == Enum.UserInputType.Keyboard then
        print("xd")
        if input.KeyCode == Enum.KeyCode.X then
            print("xpress")
        end
    end
end


UserInputService.InputBegan:Connect(onInputBegan)

Nothing is printed, I am very confused

0
what is the value of gameProcessed? Clasterboy 72 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

It should be input.UserInputType, not type.

Ad

Answer this question