Yes and that would be doing the players mouse here is an example for this
local player = game.Players.LocalPlayer
local Mouse = player:GetMouse()
print(Mouse.X, Mouse.Y)
-- GUI pos compare
if GUI.YOUR_BUTTON_NAME_HERE.Position == Mouse.Position then
--.. code
end
Hello, you can make use of the GetGuiObjectsAtPosition to get the GuiObjects on a certain position.(you will need to use the Mouse (to get the position))
Perhaps you could try adding a debounce or check if the “mover” gui object is already at that specific position, if the gui is at that position, you can just return and end the event.
That’s a very bad way of handling it, the code checks if the mouse is precisely at that position, the code wouldn’t work reliably across multiple different computers as every monitor isn’t the same so the gui would just tween when a user didn’t intend to.