I have the following code:
Code: Select all
function widget:MousePress(x, y, button)
echo("Mouse pressed")
if button == 3 then
CancelButton()
end
end
function widget:MouseRelease(x, y, button)
echo("Mouse released.")
if button == 1 then
echo("Left mouse button released at: " .. x .. ", " .. y)
RegionAddGuiButton(x, y)
RegionRemoveGuiButton(x, y)
RegionMoveGuiButton(x, y)
end
end
When I run Spring, I see the message telling me the mouse was pressed (and I have used that call-in for other logic as well and it has worked). However, I do not see the message saying that the mouse was released, period. I double and triple-checked the function name, and as far as I can tell it should be working (I even saw it in some other code). Why is this not working? I am incredibly confused about this.