Need Help With Fixing Custom Chat's Bugs

Hi, and I wanted to make custom chat like this (image from Outlaster):

But I have 2 problems, the text is not moving properly depending on player’s name

image

image

And second problem is, text position is this (Automatic size property scales text with background frame’s size and text is bigger):

image

But how the text should look like

image

I use property called Enum.AutomaticSize.X

You can download UIs here:

UIs.rbxm (11.6 KB)

I use module to make a chat message:

function sendMsg:Send(msg, name)
	local newMsg = script.MessageTemplate:Clone()
	local plrName = newMsg.PlayerNameBackground.PlayerName
	local msgText = newMsg.MessageBackground.Message
	
	plrName.Text = name
	msgText.Text = msg

	msgText.Parent.Position = UDim2.new(plrName.Parent.Position.X.Scale + msgText.Parent.Size.X.Scale + 0.05, 0, 0, 0)
		
	newMsg.Parent = script.Parent.Parent.BackgroundFrame.ChatFrame
end

At this line I tried to move the text depending on size of player’s name and it seems didn’t helped

msgText.Parent.Position = UDim2.new(plrName.Parent.Position.X.Scale + msgText.Parent.Size.X.Scale + 0.05, 0, 0, 0)

Thanks for your help :grinning:

Use a scale plugin and make the text smaller into the text box

@DevelopedAlex, As I said the text is already smaller and AutomaticSize makes it same size with Frame