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
And second problem is, text position is this (Automatic size property scales text with background frame’s size and text is bigger):
But how the text should look like
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