Hi. I’m still really new to chat syntax – I’m trying to make a modulescript where the yellowTeam chat channel will have their chat color set to yellowColor only.
The problem is that the chat color affects all chat channels, I tried using the :SaidMessage method, but It didn’t work too and the chat color didn’t get set at all. I’m not sure how i would do this, help would be appreciated.
local function chatColor(ChatService)
local yellowTeam = ChatService:GetChannel("Yellow Team")
local yellowColor = BrickColor.new("Bright yellow").Color
ChatService.SpeakerAdded:Connect(function(playerName)
for _, speakerName in ipairs(yellowTeam:GetSpeakerList()) do
local speaker = ChatService:GetSpeaker(speakerName)
speaker:SetExtraData("ChatColor", yellowColor)
end
end)
end
return chatColor
saidmessage:
local function chatColor(ChatService)
local yellowTeam = "Yellow Team"
local yellowColor = BrickColor.new("Bright yellow").Color
ChatService.SpeakerAdded:Connect(function(playerName)
local speaker = ChatService:GetSpeaker(playerName)
speaker.SaidMessage:Connect(function(message, channelName)
if channelName == yellowTeam then
speaker:SetExtraData("ChatColor", yellowColor)
else
speaker:SetExtraData("ChatColor", nil)
end
end)
end)
end
return chatColor