local function onCharacterAdded(player, character)
task.wait(.2)
local outline = script.Highlight:clone()
outline.Parent = character
outline.Adornee = character
end
this code runs when the players .CharacterAppearenceLoaded event fires, i’ve tested with normal CharacterAdded also.
ok after some looking into it it seems that there were some models in replicated storage using highlights,
i used the below code (in starter gui as a localscript) to delete the highlights.
repeat task.wait() until game:IsLoaded()
for _, p in game.ReplicatedStorage:GetDescendants() do
if p:IsA("Highlight") then
p:Destroy();
end
end
This simple script is specialized for my game where when most of the cloning happens, its on the server. This works by deleting the highlights from the client but keeping them on the server so when the server clones them and parents them, they’ll retain the highlight(s). (basically if i had a brick in replicated storage with a highlight, i could remove it on client and when the server clones that and parents it, it’ll still have a highlight.)
i also optimized a script which was cloning lots of highlights and setting their parents to nil for future use, i think the fact that the highlights that you cant see are still counted for the highlight limit is a bit unintuitive, but this is the solution i’ve reached.