It is not possible in robloxs new textchatservice (to my knowledge) because robloxs actual gui for textchatservice is in coregui and using textchatserviceproperties doesnt work after its initally fused with the textchatmessage and changing textchatmessage doesnt work at all.
Sorry, I changed the property for textcolor3 in textchatservice’s ChatWindowConfiguration to the RGB every heartbeat but if they didnt have the rgb enabled, I use overridemessageproperties on the incomingmessage callback to override that and make it the default text color. There’s probably a better way to do it and I might be recalling it incorrectly but it’s what worked for me.
Also if anyone else wants to make these here is the code, with <rainbow> tags:
function gsub_literal(str, target, replacement) -- thx chatgpt
local search_start = 1
local result = {}
while true do
local found_start, found_end = string.find(str, target, search_start, true) -- 'true' makes it plain text search
if not found_start then
table.insert(result, string.sub(str, search_start))
break
end
table.insert(result, string.sub(str, search_start, found_start - 1))
table.insert(result, replacement)
search_start = found_end + 1
end
return table.concat(result)
end
local function rainbowText(text)
text = `<font color="rgb(255, 255, 255)">!{text}</font>`
text = gsub_literal(text, "<rainbow>", "</font>")
text = gsub_literal(text, "</rainbow>", '<font color="rgb(255, 255, 255)">')
return text
end
TextChatService.OnIncomingMessage = function(message: TextChatMessage)
local props = Instance.new("TextChatMessageProperties")
props.Text = rainbowText(message.Text)
return props
end
RunService.RenderStepped:Connect(function()
TextChatService.ChatWindowConfiguration.TextColor3 = Color3.fromHSV((tick() / 5) % 1, 1, 1)
end)