What do you want to achieve? I’m trying to make a custom player list, similar to that of the 2006-2010 player list on Roblox.
What is the issue? I don’t know how to get the players chat color, which the older versions of Roblox used in the player list.
What solutions have you tried so far? I’ve tried my hand at this a couple weeks ago, but I couldn’t seem to figure out what to do, nor what the problem was.
I believe this was the method used to get player chat colors:
local Colors = {
Color3.new(253/255, 41/255, 67/255),
Color3.new(1/255, 162/255, 255/255),
Color3.new(2/255, 184/255, 87/255),
BrickColor.new("Bright violet").Color,
BrickColor.new("Bright orange").Color,
BrickColor.new("Bright yellow").Color,
BrickColor.new("Light reddish violet").Color,
BrickColor.new("Bright yellow").Color,
}
local function GetNameValue(pName: string): number
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
local function GetChatColor(name: string): Color3
return Colors[(GetNameValue(name) % #Colors) + 1]
end
print(GetChatColor("HugeCoolboy2007"))