Alright, I turned bubble chat on, made it black color, and then I put script inside of ServerScriptService with the idea of making chat tags. I made the script, but it gave me error and I was wondering if it could be because of the bubble chat or is it completely different reason..Help me please.
Also, the script:
local ServerScriptService = game:GetService("ServerScriptService") local ChatService = require(ServerScriptService:WaitForChild("ChatServiceRunner"):WaitForChild("ChatService")) local Players = game:GetService("Players") local Admins = ('lmao1717') ChatService.SpeakerAdded:Connect (function(PlrName) local Speaker = ChatService:GetSpeaker(PlrName) for _,v in pairs(Admins) do if Players[PlrName].Name == v then Speaker:SexExtraData('Tags', {{TagText = "Manager", TagColor = Color3.fromRGB(255, 255, 255)}}) end end end)
I found 2 problems First, you need to change the "()" to "{}" to make it into a table
local Admins = {'lmao1717'}
Second
Speaker:SexExtraData('Tags', {{TagText = "Manager"
I dont think you meant to type "SexExtraData" but intead "SetExtraData"
The problems seems to be that your Admins
value isn't a table, but a string. The for loop wont work because of this.
You can make it a table by replacing the parentheses with curly brackets.
local ServerScriptService = game:GetService("ServerScriptService") local ChatService = require(ServerScriptService:WaitForChild("ChatServiceRunner"):WaitForChild("ChatService")) local Players = game:GetService("Players") local Admins = {'lmao1717'} ChatService.SpeakerAdded:Connect (function(PlrName) local Speaker = ChatService:GetSpeaker(PlrName) for _,v in pairs(Admins) do if Players[PlrName].Name == v then Speaker:SexExtraData('Tags', {{TagText = "Manager", TagColor = Color3.fromRGB(255, 255, 255)}}) end end end)
I found 2 problems First, you need to change the "()" to "{}" to make it into a table
view source
1 local Admins = {'lmao1717'} Second
view source
1 Speaker:SexExtraData('Tags', {{TagText = "Manager" I dont think you meant to type "SexExtraData" but intead "SetExtraData"