What solutions have you tried so far?
I’m not sure what solutions there are on richtext. I’m very confident that richtext is enabled. I made sure richtext is enabled on the text and enabled richtext on a script. I think something is wrong with the rich() function.
local htmlReset = "</font>"
local function rich(color: Color3)
return [[<font color=\"rgb(]].. color.R.. ", ", color.G.. ", ".. color.B .. [[)\">]]
end
print(rich(Color3.new(1, 0, 0)))
--<font color=\"rgb(1, 0, 0)\">
local attackerString = rich(enemyPlr.TeamColor.Color).. enemyPlr.Name.. htmlReset
local deadString = rich(plr.TeamColor.Color).. plr.Name.. htmlReset
local str = attackerString.. " killed ".. deadString.. "!"
KillFeedEvent:FireAllClients(str)
print(str)
--<font color=\"rgb(1, MalAllie</font> killed <font color=\"rgb(1, MalAllie</font>!
I’m not sure why you are putting backward-slashes there. Also, the RGB properties of a Color3 object aren’t what you think. You will have to convert it to the HEX format. Also, you need to close the <font> tag with a </font> tag. Here’s a fixed function:
local function rich(text: string, color: Color3)
return "<font color='#" .. color:ToHex() .. "'>" .. text .. "</font>"
end