UIGradient on UIStroke is suddenly scaling to the parent, not the stroke

The Problem
Somewhere between today and a couple days ago, the behavior of UIGradient on UIStroke has changed unexpectedly, without notice. I noticed today that on my UI, the gradients are now constrained to parent space instead of the stroke space, which was not the case a couple days ago. This has broken a lot of things in my UI.

Visual Demonstrations
The following image shows the old behavior on the left, with the new behavior on the right:
/home/cheapsk9/.var/app/org.vinegarhq.Vinegar/data/vinegar/prefixes/studio/drive_c/users/steamuser/Pictures/Roblox/RobloxScreenShot20250328_023250026.png

The new behavior is especially apparent in this video, where the gradient is rotating:
/home/cheapsk9/Videos/OBS/2025-03-28 02-46-41.mp4

Real-World Example of Impact
Some time ago I made a recreation of the Roblox logo out of just GuiObjects, whose shading is now broken due to this update.
Screenshot of this Roblox logo recreation that relied on this behavior, from 2023-06-10T05:00:00Z:
image

Screenshot of the logo which is affected negatively due to this change, from 2025-03-27T05:00:00Z:
image

Bug or Not?
I don’t know whether this change was made intentionally, or was a side-effect of the engineers changing something. I searched everywhere and didn’t find any mention of this behavior changing, which is why I am filing a bug report.

Reviewing the Change
This new behavior of constraining the gradient to the parent can have potential upsides, but for the most part, this makes things that were possible before to be impossible. If you wanted to force this new behavior, you could implement it by using scripts, albeit you may need a bit of simple math to do so. However, using scripts to go backwards and get the old behavior is impossible, due to the constraints.

Personally, I don’t like this change, but if there is some kind of performance benefit to doing things this way, or if it is more optimized, then I am more inclined to be in support of it. However, I am a little in shock that this behavior which artists and UI designers expect to stay constant changed without warning. Even something as small as this can break a lot of things, as it has done in my UI. Hopefully this issue can be addressed.

Possible Alternatives
If this is intentional, please consider reverting this change, as it breaks backwards compatibility with all existing UI designs that relied on this behavior.
Alternatively, you could add a new property, e.g. GradientSpace to UIStroke, which could use an Enum, e.g. Enum.UIStrokeGradientSpace.ScaleWithParent, but I doubt Roblox would go that far.
Existing designs would be set to use the legacy scaling behavior, and new designs would use the new behavior by default upon making a new UIStroke.
This seems like the most intuitive solution to this problem, but I’d be open to hearing your thoughts on this.

Expected behavior

I expect the behavior of UIGradient on UIStroke to stay consistent, or for advance notice to be given that a change like this could break existing designs, with an alternative such as a property to prevent existing UI from breaking.

4 Likes

Hi, thank you for submitting a report! This is definitely a bug - I’ve reverted the change which should be responsible for this issue. Please try restarting your client, and let me know if the issue still persists

2 Likes