UIStroke Transparency isn't reflected when you change GroupTransparency of a CanvasGroup

I’m trying to use the benefits of a CanvasGroup, but I ran into an issue.

Here’s a video describing the issue:

Reproduction steps:

  • Open the place provided below.
  • In the center of the viewport, you will see a CanvasGroup with its GroupTransparency property set to 1.
  • The CanvasGroup is located in StarterGui under the Repro ScreenGui.
  • You should also see an outline around the CanvasGroup, the UIStroke.
  • Attempt to change the CanvasGroup GroupTransparency property.
  • Observe the UIStroke not getting transparent or opaque.

Reproduction file:
Repro.rbxl (47.6 KB)

System information:

  • CPU: AMD Ryzen 9 5900X 12-Core Processor
  • GPU: NVIDIA GeForce RTX 3060 Ti
  • RAM: 32.0 GB 2133 MHz

Expected behavior

I should expect the UIStroke Transparency property to be properly reflected when I change the GroupTransparency property of a CanvasGroup.

1 Like

I believe this is intentional. UIStroke isn’t rendered as the same object, but a separate one, disconnected from the CanvasGroup. CanvasGroup would only affect GuiObjects that are inside the actual instance, not outside of it.

2 Likes

Thanks for the reply. However, intentional or not, I’m sure you can agree it’s unexpected behavior, which is the reason for my post in the first place. It looks like a bug so I’m treating it as a bug, if it’s not, my fault, I didn’t know.

Well if you were to look into it deeper, the transparency of a UIStroke on a Frame/CanvasGroup parented under the original CanvasGroup is changed respectively, wouldnt it make sense for the UIStroke under the original CanvasGroup to be the same?

image image

1 Like

That’s because the UIStroke child to the second CanvasGroup is considered inside of the first CanvasGroup. Everything inside a CanvasGroup is rendered as a single image.

this is intentional. the UIStroke parented to the CanvasGroup affects the border of the ui object itself, and is not part of it’s actual contents, therefore changing GroupTransparency will not affect it. you could nest it inside another CanvasGroup, that’s what i do

Hi @sozzly - as others have mentioned and explained, this behavior is as-designed.

Thanks @VegetationBush and @Mikos_Drafle for describing the functionality :pray:

1 Like