Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can you make a certain sound be heard be only a certain team?

Hello, I'm working on something that happens to have an intermission song/music whatever you want to call it, though I only want it to be heard by the people in the lobby, because it can interfere if someone is trying to load in, instead of them hearing the normal loading sounds that they have, they are topped off by the intermission song, I've tried to put the sound inside the team name, so Teams > Lobby > IntermissionSong but it didn't work, it was still heard by the "Loading" team. Any suggestions?

1 answer

Consider placing the intermission music somewhere in StarterGui so that each player will have their own local copy of the intermission music. This way, you can play the intermission music for any subset of players without the rest being able to hear the music, as any sound that is a descendant of a player's PlayerGui can only be heard by the associated player.

Once you have done this, create a server-side script that iterates all players and sends a notification to those that are on the "Lobby" team. Then have a local script for each player listen for this notification and play the intermission music whenever the notification is received. This notification mechanism can be implemented using remote events / functions.

This discussion is preserved as it was. New answers, comments, and votes are closed.