This event is triggered when the GUI object is middle-clicked on the mouse.
Add the following client script under ClientfirstLogic. Start the game, and left-click on the UiPanel and the UiButton. Observe whether the event is triggered or not.
wait(1) local uipanel = RWObject.Create("UiPanel") -- create a UiPanel local uibtn = RWObject.Create("UiButton") -- create a UiButton uibtn.Parent = uipanel -- set the parent of the created UiButton to the new created UiPanel local person = Players:GetLocalPlayer() -- retrieve the player uipanel.Parent = person. GameUI -- Set the parent of the UiPanel as GameUI uibtn.GuiMouseScrollPress:Connect(function() -- the event of mouse middle-clicking is triggered on the UiButton print("The button is middle-clicked on the mouse") end) uipanel.GuiMouseScrollPress:Connect(function() -- the event of mouse middle-clicking is triggered on the UiPanel print("The UiPanel is middle-clicked on the mouse") end)