Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Taking Mouse Wheel Input ?

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

✓ Accepted answer

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)

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

1 comment

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.