RichText Custom Message Leaves Behind Spaces

When creating a custom text message and using richtext for one of it, it leaves behind 2 annoying spaces. Also couldn’t tell if it was a bug or not, so I’m going to leave it in this category.

image

local details = {
	Text = [[<font color="rgb(255, 255, 0)">]]..player.Name..[[</font>]].." has just unlocked: "..[[<font color="rgb(112, 6, 75)">]]..chosenPrize.Name..[[</font>]],
	Color = Color3.fromRGB(255, 255, 255)
}
			
details.Text:gsub("%s", "")
			
game.StarterGui:SetCore("ChatMakeSystemMessage", details)

The UI element is sized based on the text length instead of the context text length, so you’re correct it’s most likely a bug. Although RichText isn’t enabled on the default chat(you probably used a script to enable it manually) therefore it may not be a feature at all.

1 Like

I did. I think I even know why it’s doing it, it’s just that there’s no possible solution.