Highlights work in studio, not in game? [FIXED]

What do you want to achieve?

Highlights work normally in studio:

What is the issue?

However they don’t work at all in game:

What solutions have you tried so far?

Looked through the forums and yt, couldn’t find anything, I tried both making the code change its
adornee and or setting it to enabled true/false - both options worked fine in studio but not in game.
The code works fine but ill still share the main part for handling the highlights. I’m pretty sure I’m
doing something wrong but I can’t seem to figure out what

snippet from the code:

detectorFlashlight.MouseHoverEnter:Connect(function(player)
	if switched == false then
		flashHighlight = true
		beltHighlight = false
		clonedFlashlgiht.Highlight.Enabled = true
		BeltHighlight.Highlight.Enabled = false
	else
		flashHighlight = false
		beltHighlight = true
		clonedFlashlgiht.Highlight.Enabled = false
		BeltHighlight.Highlight.Enabled = true
	end
end)

I encountered a similar issue a few weeks ago, and I found a potential solution that may help you resolve the problem. Instead of having highlights in the items, you could consider adding them through Instance.new directly in the script. Roblox has certain limits for highlights in games, although I don’t recall the exact limitations. However, by utilizing Instance.new you might be able to fix it.

Thanks I just tried that with new highlights and it works, upon further testing I found the problem, my original code also works in game but the highlights only appear in studio, the outline is just not visible in game but it is in studio for some reason. Here’s a video with my original code but with default highlight properties in game:

I’ll still leave this here in case anybody runs into the same problem

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.