Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Making Music Play For Individual Players?

Asked by 6 years ago

So this may seem like a really basic question but I honestly don't know how to do this. I want to make it so that when music plays, it only plays for one character instead of server wide music. What I mean is say for instance that one player is in a menu screen with a menu screen "song", then only that player will hear the menu screen song while another player might be hearing adventure music while playing the game. I can't have a player join the game, enter a menu, and then have the menu song play over all the other songs. I also need to know how to do this so that I can make it so players can play their own songs at some point. I just need to know how to make the music play for individual players instead of server-wide. Any help?

2 answers

Log in to vote
1
Answered by
cabbler 1942 Moderation Voter
6 years ago

This a duplicate but old answers are kinda bad. You should understand basic networking.

With filtering disabled nearly everything replicates (shows) to everyone else, so your only options are SoundService.PlayLocalSound or creating sounds inside PlayerGui. Nothing in PlayerGui replicates.

With filtering enabled, as long as the sound is created client-side you're gucci. However if the sound is server-side and SoundService.RespectFilteringEnabled is false, clients can still modify that sound. Try to avoid that

Do what is right for you

Ad
Log in to vote
0
Answered by 6 years ago

Local Script

Sound:Play()

Answer this question