How to detect mouse wheel input?

If I scroll using my mouse wheel, how can I detect it? Plus, how can I detect how much I scrolled?

I don’t know what else to say here, since this is such is a simple question :sweat_smile:, so if you need more info then please let me know.

6 Likes

There are signals for this.

You could also use UserInputService if you would like.

UserInputService.InputChanged:Connect(function(input)
    if (input.UserInputType == Enum.UserInputType.MouseWheel) then
        print("mouse scrolling!!!!")
    end
end)
5 Likes

How would I detect what direction the scroll is in?

1 Like

If you’re using the signals then it is self explanatory. MouseForward is forward. MouseBackward is backwards.

If you’re using InputChanged try reading this.

14 Likes