TextLabel.Position is is UDim2 value.
Inside a UDim2 are two Vector2 values, one for X, one for Y.
The first value in the Vector2s' is the Scale (Relative to the % of the screen resolution, so if you have a 1920x1080 screen and your X scale is .5 (%50) it would be 960 pixels)
The second value is the Offset (Size in Pixels)
So doing this is quite simple,
First you find the TextLabel and TextBound.
local TLab = script.Parent.TLab
local TBnd = script.Parent.OtherTLab
Next we want to make a function that has the values as arguments.
function matchSize(TLab,TBnd)
end
matchSize(TLab,TBnd)
Simple, right?
Now, in the function we want to define the size of the TextBound,
nSize = TBnd.Size
Okay, we're almost done, now we change the Offset to the new size
TLab.Size.Offset = nSize
and now We're done, the code should look like this:
local TLab = script.Parent.TLab
local TBnd = script.Parent.OtherTLab
function matchSize(TLab,TBnd)
nSize = TBnd.TextBounds
TLab.Size = UDim2.new(TLab.Size.X.Scale,nSize.X,TLab.Size.Y.Scale,nSize.Y)
end
matchSize(TLab,TBnd)
If you have any issues, don't hesitate to tell me I made a mistake!
Edit: I made a mistake with what TextBound was, but I fixed it.
Edit2: Apparently Size.Offset is read only, (Can't be changed) so I changed it to
TLab.Size = UDim2.new(TLab.Size.X.Scale,nSize.X,TLab.Size.Y.Scale,nSize.Y)