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:
local Player = Game.Players.LocalPlayer
local Mouse = Player:GetMouse()
local aText = "Testing 1, 2, 3..."
Mouse.TargetFilter = nil
Mouse.Move:connect(function()
if not Mouse.Target.Parent then return end
if Mouse.Target and Mouse.Target.Parent == script.Parent then
Player.PlayerGui.ScreenGui.SpecialHoverGui.Text = aText
Player.PlayerGui.ScreenGui.SpecialHoverGui.Visible = true
elseif Mouse.Target and Mouse.Target.Parent ~= script.Parent then
Player.PlayerGui.ScreenGui.SpecialHoverGui.Visible = false
end
end)
However this does not work, could anybody help? Thanks.

1 comment
Where is this script located? Is it in a part?