How do i get the chat prefix of a player?

  1. **What do you want to achieve?**i want to get the chat prefix (with color) of a player, like this:
    aaa

  2. What is the issue? the only solutions i have found are if the player has already chatted, however this is for console chat (which i have filtered btw) and i want it to show the prefix for them, but they cant chat so i cant get the color

  3. What solutions have you tried so far? i looked at devforum and google

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

-- This is an example Lua code block

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

1 Like

So you want what exactly to get? The color or the name? The name shown in chat represents the display name if there is one set by the player.

1 Like

the color, or if possible the whole prefix, im making a console chat so i want the console messages to have prefix color too

1 Like

console cant chat, and i want my xbox friend to be able to play my games, so im making console chat

1 Like

As I mentioned the name shown is the DisplayName of the user. If there isn’t one, then the Username is displayed. This depends on the chat version.
As for the color, this will help.

it just does this now
s

Make sure you got all the html fields correct. There’s a doc tutorial on rich text formatting, I suppose you know it. That TextLabel definitely supports RichText