I’m trying to make a tip system where the speaker/prefix is a different color than the rest of the messages
“[System]: Join our group!”
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local TipEvent = ReplicatedStorage:WaitForChild("GameTips")
local gameTips = {
"Use /panel to see the list of all commands!",
"It's best to save your build every 10 minutes so you don't accidentally lose it.",
"If you're enjoying the game, make sure to like and favorite!",
"Make sure to join our group, Pixelprint for updates!",
"Only give build permissions to players who you trust!",
"If someone is breaking the rules, ping a moderator in our Discord server!",
}
local function sendChatMessage(content, color)
TipEvent:FireAllClients(content, color)
end
Players.PlayerAdded:Connect(function(player)
sendChatMessage(player.Name .. " has connected.", Color3.fromRGB(86, 218, 227))
end)
Players.PlayerRemoving:Connect(function(player)
sendChatMessage(player.Name .. " has departed.", Color3.fromRGB(127, 166, 249))
end)
local tipIndex = 1
while true do
task.wait(1) -- Adjust the wait time as needed
local tip = gameTips[tipIndex]
sendChatMessage("[System]: " .. tip, Color3.fromRGB(255, 255, 255))
tipIndex = tipIndex + 1
if tipIndex > #gameTips then
tipIndex = 1
end
end
How would I modify this script so that the speaker variable is like red or smth