So this script turns a textlabel visible when the mouse is over a model with a certain stringvalue inside of it. Here's the script:
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local red = player.PlayerGui:WaitForChild("WeaponHUD")
local TextLabel = red:WaitForChild("TextLabel")
function hov()
if mouse.Target.Parent:FindFirstChild("ShowGui") then
red.TextLabel.Visible = true
elseif mouse.Target.Parent:FindFirstChild("ShowGui") then
red.TextLabel.Visible = false
end
end
mouse.Move:Connect(hov)
As you can see, I also tried to make it invisible once the mouse is away from that certain model. But I don't see why. Someone please explain.

4 comments
Your conditions for both "if"s are the same.
can you post the exact error?
I'm not getting any errors in the output, and I don't understand what love says.
How can I fix the script?