So. I've got the script to make the chat, but I'm trying to do it where when a certain text is chatted, then that message changes color to correspond with it..
local messages = { -- was gonna try that.
"[SERVER] Remember to thumbs up and favorite!";
"[SERVER] Don't spam or be banned!";
"[SERVER] Want mod or admin privileges, join the group!";
"[SERVER] Remember we drive on the LEFT of the road!";
"[SERVER] Remember to enjoy yourself.";
}
local colors = { --These are in order corresponding to "messages"
Color3.new(255, 255, 224);
Color3.new(255,0,0);
Color3.new(135,206,235);
Color3.new(255,255,224);
Color3.new(135,206,235);
}
while wait() do
local r = math.random(1,5)
game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage",{
Text = messages[r];
Color = colors[r];
Font = Enum.Font.SourceSansBold;
FontSize = Enum.FontSize.Size8;
})
wait(5)
end
FOR CAIL
If Text = "[SERVER] Remember to thumbs up and favorite!" then Color3.new(255, 255, 224)
So, if the text says Say message 1, it will be the color of the first line in colors, get it?
Update:
I have tried this, but I keep getting "Expected identifier, got 'if'"
local colors = {
if Text == "[SERVER] Remember to thumbs up and favorite!" then
Color = Color3.new(255, 255, 224)
elseif Text == "[SERVER] Don't spam or be banned!" then
Color = Color3.new(255,0,0)
elseif Text == "[SERVER] Want mod or admin privileges, join the group!" then
Color = Color3.new(135,206,235)
elseif Text == "[SERVER] Remember we drive on the LEFT of the road!" then
Color = Color3.new(255,255,224)
elseif Text == "[SERVER] Remember to enjoy yourself." then
Color = Color3.new(135,206,235)
end
}
So, it'd be in this case,
local messages = { -- was gonna try that.
"[SERVER] Remember to thumbs up and favorite!";
"[SERVER] Don't spam or be banned!";
"[SERVER] Want mod or admin privileges, join the group!";
"[SERVER] Remember we drive on the LEFT of the road!";
"[SERVER] Remember to enjoy yourself.";
}
local colors = {
if Text == "[SERVER] Remember to thumbs up and favorite!" then
Color = Color3.new(255, 255, 224)
elseif Text == "[SERVER] Don't spam or be banned!" then
Color = Color3.new(255,0,0)
elseif Text == "[SERVER] Want mod or admin privileges, join the group!" then
Color = Color3.new(135,206,235)
elseif Text == "[SERVER] Remember we drive on the LEFT of the road!" then
Color = Color3.new(255,255,224)
elseif Text == "[SERVER] Remember to enjoy yourself." then
Color = Color3.new(135,206,235)
end
}
while wait() do
local r = math.random(1,5)
game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage",{
Text = messages[r];
Color =
Font = Enum.Font.SourceSansBold;
FontSize = Enum.FontSize.Size8;
})
wait(5)
end

5 comments
And once again: I don't understand you. Give an example of what you mean, instead of beating around the bush.
Okay
Your code is correct I don't see what you're trying to ask.
So, that's what I'm trying to ask...
Well, why would you do that? Your original code already worked.