How do I make it so when someones mouse hovers over a brick, a gui will appear and follow aside from the mouses x,y positions?
The player's mouse can be accessed (locally only) by game.Players.LocalPlayer:GetMouse()
, so you can tell that the mouse is hovering over a brick by mouse.Move:connect(function()if mouse.Target==brick then end end)
. To position the gui element is to simply set it at UDim2.new(0,mouse.X,0,mouse.Y)
because mouse.X
and mouse.Y
are the mouse's screen coordinates (in pixels).