This is done through the Lua Chat API on the server.
- Require ChatService, which is a ModuleScript found under
ServerScriptService.ChatServiceRunner
; - This returns an object with a particular method you’ll need, which is
GetSpeaker
, and it takes as its argument the username of the person whose tags/name color you want to change; - Calling
ChatService:GetSpeaker("sircfenner")
will return aChatSpeaker
object, which has another method you’ll need, namelySetExtraData
(wiki); - This function takes
–key
(a string indicating which aspect you wish to change); and
–data
(the information you wish to apply - see table):
Key | Data type |
---|---|
ChatColor | Color3 |
NameColor | Color3 |
Font | Enum.Font |
TextSize | int |
Tags | array |
A ‘tags’ array can contain several tags. Each tag needs to be a table, and can have two keys:
– TagText (string)
– TagColor (Color3)
Assuming speaker
refers to a speaker object you have obtained, this is how you would add a red “VIP” tag:
speaker:SetExtraData("Tags", {{TagText = "VIP", TagColor = Color3.new(1, 0, 0)}})