I'm working on chat tags, and got them working pretty well with badges. It would display everything correctly, but as soon as I start working with GetRankInGroup it starts bugging out. I've looked online a lot to find the issue but cant. Here's the script.
local ServerScriptService = game:GetService("ServerScriptService")
local ChatService = require(ServerScriptService:WaitForChild("ChatServiceRunner"):WaitForChild("ChatService"))
local Players = game:GetService("Players")
local BadgeService = game:GetService("BadgeService")
ChatService.SpeakerAdded:Connect(function(player)
local Speaker = ChatService:GetSpeaker(player)
if player:GetRankInGroup(5196996) == 254 then
Speaker:SetExtraData('Tags',
{{TagText = "Owner",
TagColor = Color3.fromRGB(255, 0, 0)
}})
elseif BadgeService:UserHasBadgeAsync(Players[player].UserId, 1397218698) then
Speaker:SetExtraData('Tags',
{{TagText = "Alpha",
TagColor = Color3.fromRGB(239, 184, 56)
}})
end
end)
The error message seems to take me to line 09. Not sure whats up with that, but it worked fine before having the Owner rank.

2 comments
That did it. Unknown how to accept however. Let me know and I will.
uh click on the button that says "accept sulation" or something that has accept in it.