Mouser Over Brick Text?
Asked by
A9X 10
9 years ago
I'm trying to make a brick where you hover over the brick and some text appears by your cursor, and if you move the cursor while still on the brick it follows the cursor until you stop hovering over the brick. Thanks to https://scriptinghelpers.org/questions/16904/how-can-i-make-it-when-my-mouse-hovers-over-a-player-a-gui-comes-up-with-there-name this is what I have so far:
01 | local Player = Game.Players.LocalPlayer |
02 | local Mouse = Player:GetMouse() |
03 | local aText = "Testing 1, 2, 3..." |
04 | Mouse.TargetFilter = nil |
06 | Mouse.Move:connect( function () |
07 | if not Mouse.Target.Parent then return end |
09 | if Mouse.Target and Mouse.Target.Parent = = script.Parent then |
10 | Player.PlayerGui.ScreenGui.SpecialHoverGui.Text = aText |
11 | Player.PlayerGui.ScreenGui.SpecialHoverGui.Visible = true |
12 | elseif Mouse.Target and Mouse.Target.Parent ~ = script.Parent then |
13 | Player.PlayerGui.ScreenGui.SpecialHoverGui.Visible = false |
However this does not work, could anybody help? Thanks.