PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

WheelBackward

Fires when the mouse wheel is scrolled backwards.

See Mouse/WheelForward for the scrolling forward event.

For information on how to obtain the Mouse object, please see the Mouse page.

Note, developers are recommended to use UserInputService instead of the Mouse object in new work.


Code Samples


Mouse.WheelBackward

The below example assumes that you have already got the player’s mouse (and set it as a variable named ‘mouse’), whether by use of a /Tool, /HopperBin or the /Player/GetMouse method. It will print “Wheel went backwards!” when the player scrolls backwards.

mouse.WheelBackward:Connect(function()
    print("Wheel went backwards!")
end)