I am trying to make chat tags, example:
[Community Manager][bobthebuilder43]: Hi
But my code currently won’t work.
This is a script in ServerScriptService
(Players is defined in the actual script)
local ChatService = require(game:GetService('ServerScriptService'):WaitForChild('ChatServiceRunner'):WaitForChild('ChatService'))
local Tagged = {
['NoraaApple'] = {
['Tag'] = "Co-Owner",
['Color'] = Color3.new(1, 0.333333, 0)
},
['Epithetian'] = {
['Tag'] = "Owner",
['Color'] = Color3.new(0, 0.482353, 1)
},
['baconhairmaters2'] = {
['Tag'] = "Developer",
['Color'] = Color3.new(0, 1, 0.164706)
},
['UNSEENAS5ASSIN'] = {
['Tag'] = "Tester",
['Color'] = Color3.new(0.831373, 0, 1)
},
['AreWeReallyHuman'] = {
['Tag'] = "Tester",
['Color'] = Color3.new(0.831373, 0, 1)
}
}
Players.PlayerAdded:Connect(function(Plr)
if (Tagged[Plr.Name]) then
print('YES YES')
local speaker = ChatService:GetSpeaker(Plr)
speaker:SetExtraData("Tags", {{TagText = Tagged[Plr.Name]['Tag'], TagColor = Tagged[Plr.Name].Color}})
end
end)