Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I get a Player's Chat Color?

Asked by
Kratos232 105
10 years ago

Hi. I'm making a custom chat GUI, and I want the Player's Name to be the same as their name would be with the normal ROBLOX chat system, but I need it to be a GUI. How would I get what color their name is? I have the GUI and everything, but I just can't get the Color.

0
I remember seeing a file that someone had leaked; it contained an algorithm supposedly used by ROBLOX to generate the chat color from some properties of a Player's name. If I ever find it, I'll let you know. Otherwise, there is no direct way to access a Player's chat color. duckwit 1404 — 10y
0
On the roblox forums, there was a post (not sure if by or just he responded to it) but Quenty showed a working algorithm that found the players chat color VariadicFunction 335 — 10y

2 answers

Log in to vote
1
Answered by 9 years ago
01local CHAT_COLORS =
02{
03    Color3.new(253/255, 41/255, 67/255), -- BrickColor.new("Bright red").Color,
04    Color3.new(1/255, 162/255, 255/255), -- BrickColor.new("Bright blue").Color,
05    Color3.new(2/255, 184/255, 87/255), -- BrickColor.new("Earth green").Color,
06    BrickColor.new("Bright violet").Color,
07    BrickColor.new("Bright orange").Color,
08    BrickColor.new("Bright yellow").Color,
09    BrickColor.new("Light reddish violet").Color,
10    BrickColor.new("Brick yellow").Color,
11}
12 
13    local function GetNameValue(pName)
14        local value = 0
15        for index = 1, #pName do
View all 29 lines...

Replace INSERT_USERNAME HERE with the username

Ad
Log in to vote
-1
Answered by 10 years ago

In normal chat system it is found by using the Team Color. To make the gui you could do.

1textgui.TextColor3=(game.Players.LocalPlayer.TeamColor).Color

Hope this helps. Might work, not positive

0
If there are no teams, then it is not decided by team color VariadicFunction 335 — 10y

Answer this question