I’m trying to figure out how this game pulled off a custom chat channel that is only visible to certain teams, see image below:
For the past week or so I have been looking through the devforum, perhaps I didn’t look in the right place but nonetheless I was not able to find any concrete information about it. The closest thing I’ve found was this post: Create Custom Chat Channels with TextChatService
AFAIK, there is a visual bug that has existed in TextChatService for some time now, preventing custom team channels from being limited to team members. The only secure solution currently would be to use a custom chat module to control which user can see which text channel. See:
I don’t understand what you mean by visual bug, the chat system clearly works as intended in the game from the screenshot. The discussions in the post you have forwarded seems to be centered around the channel not disappearing after changing role.
Another thing to note is that the “Tactical” chat channel does indeed disappear upon changing team.
Am I missing something? Is the chat in the screenshot a custom module?
I believe you’re looking at the default chat system with chat history disabled / turned off.
But, also, you don’t need to necessarily make custom teams and custom team channels. Still, there are two approaches to managing team visibility.
Approach A: Latch onto Defaults with Custom Chat System
ROBLOX Creates team TextChannels by suffixing the BrickColor.Name closely associated to the team after RBXTeam (i.e. RBXTeamBright yellow). You can use this to manually filter out channels the player shouldn’t see in a horizontal-aligned List of channels. You should also check if a speaker object exists in the team for the player too.
This is an approach that can be done entirely client-sided and relies almost-exclusively on the default implementation of chat systems.
Approach B: Custom Channels, No Defaults.
Alternatively, you would need to manually manage speakers in each team you create or have created via Studio Explorer. This includes adding the speakers via TextChatService for the channels, and destroying speaker objects when players change teams or leave the game.
This requires extra management on the server, and more thorough management on the client, which is tedious and prone to the issue of sometimes still not working.