EDIT: To make sure that what I am looking for is a bit more clear, I am seeking a way to change the bubbles text color only and set so that it is only changed for certain group ranks.
Hi, I am working on a game that will have a moderation team for it, I have chat tags that display colored chat and colored tags. However I can not figure out how to have that same color also effect the default bubble chat. I have seen this in other games when in game moderation members speak, But have had no luck finding out how to implement this into my own game. Currently the chat tags are set up with group ranks. As shown below:
local Players = game:GetService("Players")
local ScriptService = game:GetService(“ServerScriptService”)
local ChatService = require(ScriptService:WaitForChild(“ChatServiceRunner”).ChatService)
local ranks = {
[“255”] = {TagText = “FOUNDER”, TagColor = Color3.fromRGB(233,30,99)},
[“254”] = {TagText = “CO FOUNDER”, TagColor = Color3.fromRGB(230,126,34)},
[“253”] = {TagText = “DEV”, TagColor = Color3.fromRGB(230,126,34)},
[“252”] = {TagText = “ADMINISTRATOR”, TagColor = Color3.fromRGB(46,204,113)},
[“251”] = {TagText = “MOD”, TagColor = Color3.fromRGB(32,102,148)},
[“100”] = {TagText = “Moderator-In-Training”, TagColor = Color3.fromRGB(76,188,206)},
}
local groupId = 4460143
ChatService.SpeakerAdded:Connect(function(SpeakerName)
if game.Players:FindFirstChild(SpeakerName) then
local plr = game.Players:FindFirstChild(SpeakerName)
local UserId = plr.UserId
local Speaker = ChatService:GetSpeaker(SpeakerName)
if plr.UserId == 99305466 then
Speaker:SetExtraData("Tags", {{TagText = "FOUNDER", TagColor = Color3.fromRGB(241,196,15)}})
Speaker:SetExtraData("NameColor", Color3.fromRGB(241,196,15))
elseif plr:IsInGroup(groupId) then
local rank = plr:GetRankInGroup(groupId)
for i,tag in pairs(ranks) do
if i == tostring(rank) then
Speaker:SetExtraData("Tags", {{TagText = tag.TagText, TagColor = tag.TagColor}})
Speaker:SetExtraData("NameColor", tag.TagColor)
end
end
end
end
end)
Anyone know how this would be changed to allow bubble chat to set the color to in this case gold? Thank you in advance!