Scaling UIStroke when player resizes roblox (camera.viewport)

I tried making the UIStrokes rescales and when I first start the game it rescales perfectly to the viewport, but when the I resize roblox the UIStrokes stay the same and get bulky. Can anyone help me with this problem?

Maybe you’re looking for this resource:

local function rescale(scaling)
for _, v in pairs(game:GetService(“CoreGui”):GetChildren()) do
v.Scaling = scaling
end
end

workspace.Camera.Changed:Connect(function()
rescale(workspace.Camera.ViewportSize)
end)

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