Enabling or disabling one highlight appears to affect other unrelated ones.
Visual Aid
Similar Issues
- This issue appears to be similar and unfixed. The post claims it doesn’t happen in production - I haven’t tested that.
Reproduction File
Here is a baseplate file which exhibits the issue. There are two objects: A
and B
. A
has a ClickDetector
which enables/disables its highlight on mouseover. B
only has a highlight with no ClickDetector
.
Code for A:
clickDetector = Instance.new("ClickDetector")
clickDetector.Name = "ClickDetectorA"
clickDetector.MaxActivationDistance = 40
clickDetector.Parent = script.Parent
local highlight = Instance.new("Highlight")
highlight.Parent = script.Parent
highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
highlight.FillColor = Color3.fromRGB(255, 255, 255)
highlight.FillTransparency = 0.5
highlight.OutlineColor = Color3.fromRGB(255, 255, 255)
highlight.OutlineTransparency = 0
highlight.Enabled = false
clickDetector.MouseHoverEnter:Connect(function()
highlight.Enabled = true
end)
clickDetector.MouseHoverLeave:Connect(function()
highlight.Enabled = false
end)
Code for B:
local highlight = Instance.new("Highlight")
highlight.Parent = script.Parent
highlight.FillColor = Color3.fromRGB(255, 0, 10)
highlight.FillTransparency = 0.5
highlight.OutlineColor = Color3.fromRGB(255, 255, 255)
highlight.OutlineTransparency = 0
highlight.Enabled = true