Help script chattags

and so hello everyone, I want to make it so that when people write to the chat they have a status, but I can’t do it
my script

local Players = game:GetService('Players')
local ServerScriptService = game:GetService('ServerScriptService')

local ChatService = 

local function updateTag(tagText, speakerName)
local color = nil
if tagText.Value == "Innocent" then
	color = Color3.fromRGB(255,255,255)
elseif tagText.Value == "Evil" then
	color = Color3.fromRGB(189,83,83)
elseif tagText.Value == "Crook" then
	color =  Color3.fromRGB(255, 75, 78)
elseif tagText.Value == "Assassin" then
	color = Color3.fromRGB(77, 11, 14)
elseif tagText.Value == "Supervillian" then
	color = Color3.fromRGB(255, 0, 4)
elseif tagText.Value == "Savior" then
	color = Color3.fromRGB(0,191,255)
elseif tagText.Value == "Defender" then
	color = Color3.fromRGB(0, 255, 0)
elseif tagText.Value == "Officer" then
	color = Color3.fromRGB(0, 229, 255)
elseif tagText.Value == "Superhero" then
	color = Color3.fromRGB(0,100,255)
local Speaker = ChatService:GetSpeaker(speakerName)
Speaker:SetExtraData('NameColor', color)
Speaker:SetExtraData('Tags', {{TagText = tagText.Value, TagColor = color}})
local tagText = Players[PlayerName]:WaitForChild("leaderstats"):WaitForChild("Status")
updateTag(tagText, PlayerName) -- initialize when speaker is added
tagText:GetPropertyChangedSignal('Value'):Connect(function() -- you can also use .Changed instead of :GetPropertyChangedSignal
	updateTag(tagText, PlayerName)


1 Like

help me pls to fix a problem scrioting

1 Like

help me please fixed script in Roblox Studio

If you aren’t using the LegacyChatService in the ChatService property in the explorer it will not work. Make sure you are using the Legacy version!

hello, I’m new to writing scripts, you can show in the script what’s wrong, I did one from the video and understood a little, but I don’t know how to find the error

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.