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.
local CHAT_COLORS = { Color3.new(253/255, 41/255, 67/255), -- BrickColor.new("Bright red").Color, Color3.new(1/255, 162/255, 255/255), -- BrickColor.new("Bright blue").Color, Color3.new(2/255, 184/255, 87/255), -- BrickColor.new("Earth green").Color, BrickColor.new("Bright violet").Color, BrickColor.new("Bright orange").Color, BrickColor.new("Bright yellow").Color, BrickColor.new("Light reddish violet").Color, BrickColor.new("Brick yellow").Color, } local function GetNameValue(pName) local value = 0 for index = 1, #pName do local cValue = string.byte(string.sub(pName, index, index)) local reverseIndex = #pName - index + 1 if #pName%2 == 1 then reverseIndex = reverseIndex - 1 end if reverseIndex%4 >= 2 then cValue = -cValue end value = value + cValue end return value end script.Parent.TextColor3 = CHAT_COLORS[(GetNameValue(INSERT_USERNAME HERE) % #CHAT_COLORS) + 1]
Replace INSERT_USERNAME HERE with the username
In normal chat system it is found by using the Team Color. To make the gui you could do.
textgui.TextColor3=(game.Players.LocalPlayer.TeamColor).Color
Hope this helps. Might work, not positive