Highlights are incredibly unreliable when new parts are added in/out of a model

When moving parts in and out of a model, that has a Highlight adorneed to it, doesn’t update it

Full repo code

local Highlight = Instance.new("Highlight")
Highlight.Parent = game.Players.LocalPlayer.PlayerGui

local Model = Instance.new("Model", workspace)
local Part = Instance.new("Part", Model)
Part.Size = Vector3.new(2, 2, 2)
Part.Anchored = true

task.spawn(function()
	while true do
		local NewPart = Part:Clone()
		NewPart.Position += Vector3.new(0, 4, 0)
		NewPart.Parent = workspace
		
		task.wait(1)
		
		NewPart.Parent = Model
		
		task.wait(1)
		
		NewPart.Parent = workspace
		print("Part left model")
		
		task.wait(3)
		
		NewPart:Destroy()
		
		task.wait(1)
	end
end)

game["Run Service"].RenderStepped:Connect(function()
	Highlight.Adornee= nil
	Highlight.Adornee = Model
end)

Im resetting the Adornee to nil each time otherwise it doesn’t update when I add a part either

Expected behavior

It should automatically update. I shouldn’t need to reset the adornee constantly too. I should be able to just set the adornee ONCE, and anything added or removed from the adorneed object should update as expected

3 Likes