Highlight object affecting all parts in workspace despite being a child of a model

Hello. My game has a destruction feature where destructible parts are outlined with the new Highlight class. However, I’ve been encountering a bizarre issue where a Highlight under a model ends up outlining every single part in the game. This happens both when the instance is created programmatically or through studio.

Here’s an example:

  • The bridge is the only thing that should be highlighted in white, however…

  • This is what actually happens in run-time: the entire game gets highlighted in white despite the highlight being under the parent model of the bridge parts.

  • This is the hierarchy view showing the placement of the Highlight instance. It should only be affecting the objects under its parent model called “Neutral.”
    image

Why is this happening, and how can I stop it?

2 Likes

Did you select an Adornee property in the Highlight? The Adornee should be the bridge.

And in your hierarchy there, the bridge and the neutral boxes will get the highlight… if you just want the NeutralBridge to be highlighted then move it into that model.

3 Likes

Yes, the Neutral model.

I’m aware, I just mentioned wanting to highlight the bridge for simplicity’s sake. I want the entire Neutral model outlined.

2 Likes

Ok, i know there are persistent bugs with the Highlight instance, as you can see in the bug reports. I don’t know if this is a bug, but it certainly isn’t normal behavior.

1 Like

I see. I hear it’s still a beta feature, no? Guess I’ll keep using SelectionBoxes until things become more stable.

1 Like

I don’t believe its still beta, but I posted bugs about the Outline property of it not working on mobile and tablet… but i found a workaround. I see currently two bug reports about the highlight instance not disappearing once the instance is destroyed.

Have you tried creating a separate highlight instance inside each particular model that you need highlighted rather than one catch all instance in the main “model”?

I’d love to do that—it was my original idea—BUT the 31 instance limit really limits this. Players also get highlight instances for some neat effects, so the maps would end up with a very limited amount of destructible models.

2 Likes

Oh i see, i was trying to think of a work around… hmmm… maybe a mix of highlights and selection boxes?

Is any highlight instance scripted?

1 Like

They’re all programmatically created, if that’s what you’re asking.

That’s what I’m doing for now: players still get highlights since those work while buildings will just use selection boxes. It sucks but I’ll have to wait until highlights get more polished. Thanks for the suggestions tho!

1 Like

Do you think it might be the script ?

1 Like