So, I am making a game and it is bubble chat exclusive, so i’ve been exploring it and I am stuck on this:
I am wanting it to only show the bubble chat if the players are on the same team, I cannot find anywhere where I can reference the people seeing the chat, I tried accessing the table but not luck, if anyone could figure this out I haven’t found anything about this so I think it might help people in the future wondering.
BubbleChat rendering is handled on the client, so the person seeing the chats is the individual player which the BubbleChat script is running on.
You could handle adding Team Chat in the OnPlayerChatMessage function in the BubbleChat LocalScript, which passes in the source player as one of its arguments.
if LocalPlayer.Character.Head.Color ~= sourcePlayer.Character.Head.Color then
message = “…”
end
In this instance I have it checking the talking player head color and if the player being talked to has a head color any different it will make the message appear as “…”.
To edit this to teams, simple replace with .Team
To make the chat not appear at all, simple replace the “…” line with “return”.