Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make it so when someones mouse hovers over a brick...?

Asked by 9 years ago

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?

1 answer

Log in to vote
1
Answered by
1waffle1 2908 Trusted Badge of Merit Moderation Voter Community Moderator
9 years ago

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).

Ad

Answer this question