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

Taking Mouse Wheel Input ?

Asked by
Spectrobz 140
10 years ago

Hello, does anyone know a function that detects mouse wheel button down?

I know about those two,

mouse.WheelForward:connect()
mouse.WheelBackward:connect()

But is there a function like that ?

mouse.WheelButtonDown:connect()

That page says nothing about it, but it might be outdated... http://wiki.roblox.com/index.php?title=API:Class/Mouse

Thanks.

2 answers

Log in to vote
1
Answered by
DataStore 530 Moderation Voter
10 years ago

The page that you have linked can never be outdated. It displays members of a class based on the latest API dump.

You could use UserInputService's InputBegan event, which gives you an InputObject. This instance will allow you to check whether the input was the middle mouse button by checking the UserInputType property. (Associated Enum)

Ad
Log in to vote
0
Answered by
Spectrobz 140
10 years ago

Doesnt return when I press Mouse Button 3, only works for the others...

0
It would appear that it's currently bugged (whereby the InputBegan event doesn't trigger when the middle mouse button is clicked) - Unfortunately, I do not know of any other way to detect the middle mouse button being clicked. Sorry. DataStore 530 — 10y

Answer this question