Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I make it where when a certain player chats their chat color is yellow?

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.

7 comments

2

It's not possible unless you're using a Custom Chat Gui.

0

I've seen people do it before though?

1

Those people you've seen do it before have developed their own Chat gui system. If you develop it yourself you can manipulate the chat colors. Otherwise you cannot.

0

You can look here if you want to start making your own chat gui: http://wiki.roblox.com/index.php?title=Making_a_Pseudo_chat_GUI

1

Actually, there is a way. SetCore. But then you will get a duplicate. Unless you disable the chat textbox.

0

All hail MessorAdmin

0

#AllHailMessorAdmin

1 answer

✓ Accepted answer

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")

This discussion is preserved as it was. New answers, comments, and votes are closed.