Different bubble chat background colours between teams?

The title essentially explains it all, I want to have it so that if you are a member of a certain team you get a different colored chat bubble, is this possible to do or can you only do user specific?

so what you can do is get the color of the team using Player.TeamColor.Color
and then set it to the players chat bubble by using the chatbubble code!

How would I do that though as it won’t let me use game.Players.LocalPlayer

Now thats a billion dollar question

local settings = {
	BubbleDuration = 15,
	MaxBubbles = 3,
	BackgroundColor3 = game.Players.LocalPlayer.TeamColor.Color,
	TextColor3 = Color3.fromRGB(255,255,255),
	TextSize = 16,
	Font = Enum.Font.Highway,
	Transparency = 0,
	CornerRadius = UDim.new(0, 0),
	TailVisible = true,
	Padding = 8,
	MaxWidth = 300,
	VerticalStudsOffset = 0,
	BubblesSpacing = 6,
	MinimizeDistance = 40,
	MaxDistance = 100,
}

pcall(function()
	game:GetService("Chat"):SetBubbleChatSettings(settings)
end)

make a localscript in repfirst and paste this

How would I make this change if the user were to change team? Just getpropertychangedsignal or what

property changedsignal will help

Don’t think you can use that so that won’t work

you can! Don’t think thats whats possible or not just do the thing! nothing is imposibble

Sadly it’s not possible to change the chat color for specific bubbles using the new bubble chat, and I made a discussion topic about this a while back:
https://devforum.roblox.com/t/should-per-message-customization-be-added-to-the-new-bubble-chat/1603370
Although you can change the chat color locally, for all the bubbles, based on the local player team:

--LocalScript
local Players = game:GetService("Players")
local Chat = game:GetService("Chat")

local Player = Players.LocalPlayer 

function TeamChanged()
	local color = Player.TeamColor.Color 
	local settings = {
		BackgroundColor3 = color 
	}
	local brightness = (color.R+color.G+color.B)/3 
	if brightness < 0.5 then --if the background is dark, make the text white
		settings.TextColor3 = Color3.new(1, 1, 1)
	end
	Chat:SetBubbleChatSettings(settings)
end

TeamChanged()
Player:GetPropertyChangedSignal("TeamColor"):Connect(TeamChanged)
1 Like