Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I give a Chat Bot a different Color for its name and messages?

Asked by 7 years ago

I've created an announcer bot with the new chat system, and it works as intended, but I want to know how to give it its own Color for its name in chat and its messages, because it looks pretty dull right now, and I want players to be able to tell the difference between a normal player's chat and the bot's. Here's my code, I'd like to know what to add to give it the colors. I think it has something to do with ExtraData, but I have no idea how to use that... If there's a wiki article or part of one that explains how to do this, please link that. Thanks!

local Chat = game:GetService("Chat")

local function StartBot(ChatService)
    local AnnouncerBot = ChatService:AddSpeaker("Announcer")
    AnnouncerBot:JoinChannel("All")

    game.Workspace.Bosses.ChildAdded:Connect(function(child)
        AnnouncerBot:SayMessage((string.upper(child.Name .. " has spawned!")), "All")
    end)
end

return StartBot

Answer this question