Bug with highlight

For context, my goal is to highlight an object with a local script. This object is generated by another local script
There seems to be a problem with highlight, since it appears in studio, but it doesn’t appear in the actual game, and I don’t understand if its the situation it is in, or that local script doesn’t work with highlight.
The solutions I tried so far are making sure there are less than 31 highlight groups in the entire game which is for sure there isn’t, another attempt would be to make sure that the highlight is even there and doesn’t get deleted, but it is there, but its just not appearing for the game, I am stumped and don’t know what else to do. I would be very thankful for any solutions. Thank you
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

cs:GetInstanceAddedSignal("SpinZone"):Connect(function(Thing)
	
	for _, model in ipairs(Thing.Parent:GetChildren()) do
		if model:IsA("Model") then
			local highligher = Instance.new("Highlight")
			highligher.Adornee = model
			highligher.DepthMode = Enum.HighlightDepthMode.Occluded
			highligher.Enabled = true
			highligher.OutlineColor = Color3.new(0,0,0)
			highligher.FillTransparency = 1
			highligher.OutlineTransparency = 0
			highligher.Parent = model
		end
	end
end

This is studio ^

This is in game ^

Maybe the script is running after everyone loaded in? Try redoing it before you call the instance added connection

I can’t do this, because I’m generating each world (which includes the wheel) on join or when they enter the world, technically the object doesn’t exist when you enter the world, so that’s why I’m using instance added signal to kind of wait for it to generate. And either way, I made a print loop for all the children inside the model and verified that the highlight is there, its just not showing

Creating instances into the workspace doesn’t work on the client - at least for me it doesn’t. Make this on the server and make it invisible, then edit it on the client.

It’s impossible to do this on the server, since this object is taken from replicated storage and put into the workspace through the client, this is for performance. As seen in the original post highlight is seen in studio, however it isn’t seen in the actual game, which is making me wonder if this is Roblox’s bug.

Maybe parent the highlight in the players gui?

1 Like

Wow that worked! Idk why but thank you very much, it took hours to solve it

1 Like

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