Trying to create a custom chat, and problems I face are when a message is too long, the text just goes small, instead of doing what the Roblox chat does, create a second/third line etc.
I did some testing in studio, and found that just doubling the frame the text is in size, it seems to look/work good.
So how I set the frames up
local MessasgeFrame = Instance.new('Frame')
MessasgeFrame.AnchorPoint = Vector2.new(0.5, 1)
MessasgeFrame.BackgroundTransparency = 1
MessasgeFrame.Position = UDim2.new(0.5, 0, 1, 0)
MessasgeFrame.Size = UDim2.new(1, 0, 0.1, 0) -- Get message length/adjust height
local Message = Instance.new('TextLabel')
Message.AnchorPoint = Vector2.new(0.5, 0.5)
Message.BackgroundTransparency = 1
Message.Position = UDim2.new(0.5, 0, 0.5, 0)
Message.Size = UDim2.new(0.95, 0, 0.9, 0)
Message.Font = Enum.Font.GothamSemibold
Message.Text = tostring(speaker) .. ': ' .. message
Message.TextColor3 = Color3.fromRGB(255, 255, 255)
Message.TextScaled = true
Message.TextXAlignment = Enum.TextXAlignment.Left
Message.TextYAlignment = Enum.TextYAlignment.Top
So I need to know how I can figure out how tall the frame needs to be. Default is 0.1, but as the longer texts gets, I add 0.1. And I want to limit the message so if it gets to 0.3, then the message just gets cut off