i made a fake chat system awhile ago, and it worked perfect, until suddenly, with no changes from my end, the messages it displays started being highlighted yellow??
before it broke:
now:
local script in starterplayerscripts
local TextChatService = game:GetService("TextChatService")
local function createMessage(Name,Msg)
local nameColors = {
Color3.fromRGB(253, 41, 67), -- BrickColor.new("Bright red").Color,
Color3.fromRGB(1, 162, 255), -- BrickColor.new("Bright blue").Color,
Color3.fromRGB(2, 184, 87), -- BrickColor.new("Earth green").Color,
BrickColor.new("Bright violet").Color,
BrickColor.new("Bright orange").Color,
BrickColor.new("Bright yellow").Color,
BrickColor.new("Light reddish violet").Color,
BrickColor.new("Brick yellow").Color,
}
local function getNameValue(name)
local value = 0
for index = 1, #name do
local cValue = name:sub(index, index):byte()
local reverseIndex = #name - index + 1
if #name % 2 == 1 then
reverseIndex = reverseIndex - 1
end
if reverseIndex % 4 >= 2 then
cValue = -cValue
end
value = value + cValue
end
return value
end
local color = nameColors[math.clamp(math.abs(math.fmod(getNameValue(Name), #nameColors +1)),1,#nameColors)]
local text = `<mark><font color="#{color:ToHex()}">{Name}</font></mark>`
TextChatService.TextChannels.RBXSystem:DisplaySystemMessage(text..": "..`<mark><font color="#{Color3.new(1, 1, 1):ToHex()}">{Msg}</font></mark>`)
end
game.ReplicatedStorage.RemoteEvents.systemMessage.OnClientEvent:Connect(function(Name,message)
createMessage(Name,message)
end)