How do I automatically scale UIStrokes

I really do not know what Subject to label this under - since its a mix of coding and UI.
However the subject is mostly involved with code.


Roblox released their new “Ui stroke update” to clients, meaning we can use the new UI stroke features (Scaling on all devices, multiple strokes ETC).

The problem I have is I simply do not have all the time in the world to individually go through every Ui stroke and scale them one by one.

Is there a easy / simple way to scale them - or am I just out of luck and will have to spend many grueling hours sipping caffeine scaling every single one of them.


(I looked at the other forums about scaling - however I have 0 clue if that code still works for the new feature)

Thank you.

1 Like

what do you mean scale them?

Like change their thickness one time, or make them change dynamically based on the device or screen size?

If you want to change them one time, run a script from the command line in studio

local targetUI = game.StarterGui -- or whatever gui needs to be changed
for _, stroke in ipairs(targetUI:GetDescendants()) do
  if not stroke:IsA("UIStroke") then continue end
  stroke.Thickness = 5
end

its a beta feature and only works in studio

What I am referring to is once you change the option to ScaledSize the UiStroke goes all wonky and sizes up HORRIBLY.

This gets horrible especially when you have multiple ui strokes in your game and have to siphon through them all and change them all manually, I was wondering if there was an easier way to do such thing.

The feature was released to the public and is published already to clients since 4 days ago.

run a script to do it automatically (in command line)

local targetUI = game.StarterGui -- or whatever gui needs to be changed
for _, stroke in ipairs(targetUI:GetDescendants()) do
  if not stroke:IsA("UIStroke") then continue end

  stroke.StrokeSizingMode = Enum.StrokeSizingMode.Fixed -- i dont actually know the enum, probably something similar
end

Someone solved it already

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.