How would i find text contained frame size

As the title said,

here’s my latest attemps :

	local txtsize2 = tS:GetTextSize(
		self.str.Text,
		self.str.TextSize,
		Enum.Font.Gotham,
		self.str.AbsoluteSize
	)
	
	self.str.Size = UDim2.new(self.str.Size.X, 0, 0, self.str.Size.Y)
  • secondly, textBounds for this :
    self.dsc.Size = UDim2.new(self.dsc.Size.X, 0, 0, self.dsc.TextBounds.Y)
  • After both attemps, i recieved the same result of Y Scale which is 0

Is there somehow to find text size inside of the frame ?
anyhelp is appreciated!

dsc.Size.X.Scale, if dsc is a frame

That would be correct, wouldn’t it? You’d want to use the Y-Offset value instead of the scale, as it is the pixel count.
If you want to turn it into scale, you would use something like

local Scale = (Offset / UI.Parent.AbsoluteSize.Y)
-- where UI is the self.dsc
1 Like