I want to make it when people in the variable "devs" chat, their chat color becomes yellow instead of the standard white.
local devs = {"ProCon712","Jephi","Player1"} local plr = game.Players.LocalPlayer plr.Chatted:connect(function() if plr.Name == devs then plr:Chatted( plr:ChatColor = "yellow" ) end end)
This is what I have and it does not work.
Well, if you have seen a ROBLOX chat with custom colors, but otherwise the only way to make a chat have custom colors is making a custom chatUI. I know how to do that, I'm not saying these other users are not thinking, they are equally just as smart. But, none the less. Messor to the rescue! Using the** SetCore method ** in a LocalScriptcan make a player's chat different colors.
SetCore method: http://wiki.roblox.com/index.php?title=API:Class/StarterGui/SetCore Custom Chat: http://wiki.roblox.com/index.php?title=Making_a_Pseudo_chat_GUI
So here's a example directly from the Wiki. Although I will add some custom code to it. :)
Your function parameters are... Arg #1: String (Required) Arg #2: Variant (Required)
And of course your functions, for this one we will be using ChatMakeSystemMessage
PointsNotificationsActive (boolean);
BadgesNotificationsActive (boolean);
ChatWindowSize (UDim2);
ChatWindowPosition (UDim2);
ChatBarDisabled (boolean);
ChatMakeSystemMessage (table);
SendNotification (table);
TopbarEnabled (boolean);
local nClr3 = function(Color) if BrickColor.new(Color)~="Gray" then return BrickColor.new(Color).Color else return Color3.new(0, 1, 1) -- Cyan or Color3.new(0, 255/255, 255/255) end end function nChat(Message, Color) game.StarterGui:SetCore("ChatMakeSystemMessage", { Text = Message; -- Required. Has to be a string! Color = nClr3(Color); -- Optional, defaults to white: Color3.new(255 / 255, 255 / 255, 243 / 255) Font = Enum.Font.SourceSans; -- Optional, defaults to Enum.Font.SourceSansBold FontSize = Enum.FontSize.Size24; -- Optional, defaults to Enum.FontSize.Size18 }) end
So how I would go about making the function working is..
nChat("Hello world!", "Lime green")