TextLabel creating new line when it shouldn't

I’m working on a custom chat UI and I’m using richtext so players will be able to customize the colors in their name and stuff like that as well is give titles before names [New]PlayerName: Message
something like that. Anyways it all works fine and dandy for the most part, but for some reason when I’m inserting a new message into the frame i’m using as a textbox (there’s a UIListLayout inside the frame which makes the textlabels I put inside it stack on eachother very neat like) the message part appears below the title/name part… which is very odd because when I manually put the examplemessage inside the textbox frame it doesn’t do this. I’ve tried turning off textwrapped as well and it STILL would appear on another line. Also this textlabel is literally the width of the screen so there’s 0 chance it’s reaching the end of the line. I tried centering the text to the middle of the textlabel too and it would still have the message part of the text appear below their name/title. Mostly looking for ideas here, but I’ll include some code to give you a better understanding of what I’m doing but I don’t think this is a code issue but idk.

--Create playerstats
game.Players.PlayerAdded:Connect(function(Player)
	local folder = Instance.new("Folder")
	folder.Name = "PlayerStats"
	folder.Parent = Player
	local title = Instance.new("StringValue")
	title.Name = "Title"
	title.Value = '<font color="#FFD700">[New]</font>'
	title.Parent = folder
	local name = Instance.new("StringValue")
	name.Name = "RichName"
	name.Value = '<font color="#00FF00">'..Player.Name..'</font>'
	name.Parent = folder
	local message = Instance.new("StringValue")
	message.Name = "Message"
	message.Value = '<font color="#FFFFFF">'
	message.Parent = folder
end)
--This is the function that sends the message to the clients
ChatEvent.OnServerEvent:Connect(function(Player, Text)
	if typeof(Text) ~= "string" then return end--Check they actually sent a string
	if #Text > MaxChatLength then return end--Check that their chat is appropriate length
	
	local TextObject = getTextObject(Text, Player.UserId)
	local FilteredMessage = getFilteredMessage(TextObject)
	
	local pStats = Player.PlayerStats
	local finalText = pStats.Title.Value..pStats.RichName.Value..pStats.Message.Value..FilteredMessage.."</font>"
	
	ChatEvent:FireAllClients(Player.Name, finalText)
end)

--This is the part of the local script that creates the textlabel
ChatEvent.OnClientEvent:Connect(function(Name, Message)
	local newChat = ExampleChat:Clone()
	newChat.Parent = Chatbox
	newChat.Text = Message
end)

Okay new theory is this: local FilteredMessage = getFilteredMessage(TextObject) I THINK attaching this near the end is forcing the string to start a new line somehow? When I copy the actual text inside the created textbox over to notepad it literally starts a new line right before the filteredmessage part is added

Here’s what the looks like

--This is the text after copy pasting it into notepad from the textlabel
<font color="#FFD700">[New]</font><font color="#00FF00">Player1</font><font color="#FFFFFF">
thisismymessage</font>

Theres some real funky magic going on here and i don’t like it

Edit: So I did some testing if I use default text instead of the filtered text it still goes on a separate line, BUT if I just use a random string “Text” as a temporary placeholder it stays on the same line like it should. So I think getting the string from the player the string defaults starting a new line or something weird like that pls help :frowning:

Probably hard to follow everything I’ve said up until now but my conclusion so far is that probably the ‘Text’ variable the server is receiving from a client contains some information that says it should be a new line or something is my best guess. This ‘Text’ variable comes from a textbox

ChatEvent.OnServerEvent:Connect(function(Player, Text)
	if typeof(Text) ~= "string" then return end--Check they actually sent a string
	if #Text > MaxChatLength then return end--Check that their chat is appropriate length
	
	print("This should be on the same line as the following string - "..Text)
```Lil print test  I added anyways this is definitely the culprit because the Text string is literally printing on a new line now I just need to figure out how to make it not do that.