I have this local script here that would make a highlight around a part when the mouse enters, and delete it when the mouse leaves, but it is not working. I put the same exact script into a server script and it worked, but I don’t want the highlight visible on the server. Is there any way to do this in a local script? any help is appreciated. Thanks.
script.Parent.ClickDetector.MouseHoverEnter:Connect(function()
local Highlight = Instance.new("Highlight",script.Parent)
Highlight.FillTransparency = 1
Highlight.DepthMode = "Occluded"
end)
script.Parent.ClickDetector.MouseHoverLeave:Connect(function()
script.Parent:WaitForChild("Highlight"):Destroy()
end)