Chat channels for specific roles

Hey,

When I enable the new ChannelTabsConfiguration chat feature it creates a chat channel for every user which is not what I want. Is it possible only to give certain roles a custom channel?

image

1 Like

Im not sure, but I think you cannot.
Maybe someone else who knows more than me could help, but I have been scripting, building, and making ui’s for over like 5 years now and I don’t that thats possible.

1 Like

According to this youtube tutorial, it does seem possible. I tried following it, but nothing. I’ve also seen it in other roblox experiences that separate channels existed.

What isn’t working in your implementation? You can maintain channels without creating duplicates for each user.

I managed to get it working and create an extra default channel, but the issue is whenever I switch roles more channels are automatically added based on their teams. Which is not what I want.

I thought “roles” was some group term. I’m assuming you want team exclusive channels. You can remove players from their previous team’s channel by destroying their associated TextSource child. The source will have that user’s ID set as the UserId property.

Yea I meant teams! I assume i’d have to code this in serverscriptservice to make it that the player leaves the previous team channels? Let’s say there’s four teams, and I only want team B to have a separate channel would that be possible?

Because as of now I have an issue where every time I run the game there’s an extra chat channel called “Team” and more channels with that name are added when I switch teams ingame.

I see now in Studio what’s happening. The channel bar is currently bugged and always shows all channels the player has been added to, even after the source is removed.

Regardless, you can still have a special channel only for Team B. You’ll need to disable the default channels so they don’t interfere. You can create the main public channel manually and add all players, and make a channel specifically for team B. Teams have PlayerAdded and PlayerRemoved so you can hook functions to team changes.

The Team B channel is remain even after they switch away from it, but it seems any new messages in that channel won’t be delivered. It’ll stay as a phantom and the player’s messages are lost through it.