Help with Gui/Frame stuff

Lets say I will be inserting 10 different text label into a frame that has the UIListLayout in it, i’d have to manually edit their size, i want to make it so if there is not much TextLabel then the current ones would get as big enough to fill the frame fully and if theres alot of textlabel they’d get smaller to fill the frame fully.
so my question is, is it possible to make something like this Without scripting it detailed. If so, how?

or does anyone know a basic and solid way to accomplish this? Thanks.

you can use Automatic Sizing | Roblox Creator Documentation for that

or as you are using UIListLayout, you can also do this

function UpdateSize(Frame:Frame, UIListLayout:Instance)
   Frame.Size = UDmi2.new(0, UIListLayout.AbsoluteContentSize.X, Frame.Size.Scale.Y, 0)
end

I want the textLabels to change size, not the frame though

Oh, then you can use this script

function UpdateSize(Frame:Frame)
   local Num = 0
   for i, v in pairs(Frame:GetChildren())
      if v:IsA("TextLabel") then
         Num += 1
      end
  end
  local Size = 1/Num
  for i, v in pairs(Frame:GetChildren())
     if v:IsA("TextLabel") then
        v.Size = UDmi2.Scale(Num, v.Size.Scale.Y)
     end
  end
end

not sure if this is gonna work cus I didn’t test it… let me know if it won’t

it doesn’t work and gives the " Scale is not a valid member of UDim2" error on this part;

Thanks for your effort though

Oh sorry that was an syntax mistake, replace that script with this one

function UpdateSize(Frame:Frame)
   local Num = 0
   for i, v in pairs(Frame:GetChildren())
      if v:IsA("TextLabel") then
         Num += 1
      end
  end
  local Size = 1/Num
  for i, v in pairs(Frame:GetChildren())
     if v:IsA("TextLabel") then
        v.Size = UDmi2.Scale(Num, v.Size.Y.Scale)
     end
  end
end