Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is there a more efficient way to do this?

Asked by
Azarth 3141 Moderation Voter Community Moderator
10 years ago

I feel like what I'm doing is more complicated than need be. The purpose of it is to scoot labels UP when the max chat limit has been reached - each may have varying sizes based on their Y TextBounds, ie multi - line text.

local folder = script.Parent:WaitForChild("Frame")
local padding = 5


do
    local last
    for i,v in next, folder:GetChildren() do
        v.Position = UDim2.new(0,0,0,(last~=nil) and ((last.Position.Y.Offset + last.Size.Y.Offset)+padding) or 0 )
        last = v
    end
end
0
I don't quite understand what you are doing. Destrings 406 — 10y

Answer this question