MouseMoved (Event)
From Legacy Roblox Wiki
Jump to navigationJump to search
|
Description
Event is triggered as the mouse moves over the GUI. The x, y coordinate is given in absolute coordinates relative to ScreenGui.
To get the relative location within the object:
Example
local function updateMove(x, y) local lx = x - obj.AbsolutePosition.x local ly = y - obj.AbsolutePosition.y -- do something relative end obj.MouseMoved:connect(updateMove)