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
Rookie mistake
Color3.new(255, 255, 224);
is white.
Color3.new(135,206,235);
is white.
Color3 only goes [0-1]
so you'll have to divide your stuff by 255 or stick it through the Valkyrie Design wrapper.
Color3.new(135/255,206/255,235/255);