for _, player in pairs(game.Players:GetPlayers()) do
local teamthing = player.TeamColor
local sanitizedMessage = teamthing .. sender .. ": " .. game.Chat:FilterStringForPlayerAsync(message, player)
local playerMessages = messageData[tostring(player.userId)]
I'm making a custom chat system and I want the Player's TeamColor to go before the Player's name, but it always has issues with TeamColor being a Userdata value or something and it breaks the script. Some help with this please?

1 comment
If I understand what you're saying, "teamthing" is a UserData Value and in order to make it appear in the message as a string just simply put it inside of tostring().