PluginMouse - Mouse Input

I am building a plugin (not a widget) which relies on the mouse wheel inputs. The problem is that the mouse events “go through” the plugin gui. When I click on the gui while there is a part in the same spot on the screen (behind the gui of course) it will get selected. When I scroll, the studio camera moves as it would usually do. Buttons of the gui do work, though.
Moreover the Mouse.WheelForward and Mouse.WheelBackward doesn’t fire while the mouse is on the gui.

I used “plugin:Activate(true)” but it didn’t solve the problem.
It is certainly possible since MoonAnimator also uses the mouse wheel.
I even looked through the MoonAnimator source, but it’s just too much :sweat_smile:

There isn’t a lot on the forum regarding plugins, but I hope someone can help :smiley:

Figured it out myself :smiley:

Connecting to the .MouseWheelForward of the gui element instead of the respective event of the plugin mouse fixes the connection.
To prevent input “going through” I placed a transparent button without text behind the gui. It is a little hacky, but works perfectly.

Can’t believe this took me all day and just 45 minutes after posting my question I figured it out…
Well, hope it helps someone in the future :smiley:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.