I need to detect MouseButton1Up within a widget, how would I do this?
I have tried using UserInputService and plugin:GetMouse() but they only work withing the viewport but not in the widget, I also tried using detector buttons that filled the whole widget but they would not work consistently…
Forummer
(Forummer)
December 11, 2021, 1:26pm
#2
Did you try the UserInputService? Specifically the .InputBegan/.InputEnded events?
Orodex
(Orodex)
February 7, 2023, 9:08pm
#3
Bump, I need this too, I’ve tried the same methods as above and it’s bugging me that I can’t figure it out
majdTRM
(majdTRM)
February 7, 2023, 9:14pm
#4
Could you be a little more specific on your use-case?
Unfortunately, plugins recieve terrible support and there are many inconsistencies and bugs that crop up and remain unpatched and unfixed for years.
Maybe if you use the Frame’s Active property and InputBegan/Changed events you could do something similar?
awry_y
(Kat)
August 4, 2024, 3:25pm
#5
To anyone still wanting a solution. Here:
I know, I know. This is 2 years ago but I have a solution for this.
Which is… make a frame the size of your gui in the widget and set it’s Z-Index to “999999999”. Basically, it should be on-top of everything in your gui. Then you need to use
Frame.InputEnded
To just see if left mouse button has been released!
Example:
Base.MainOverlay.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
StopEditing()
end
end)
(From my plugin)
Hope this help…