Me and my friend are making a DJ system and for music we are having an issue were it only plays for one person and we want it to play for everyone… any way to fix this since I think its going into the play
We tested it in a local server in studio so would that have a difference?
you have to put the sound instance using a serverscript not a local script
you don’t have to do that.
@OP
The answer to your question is you play the sound on the server and it will replicate to all the clients. If you play the sound on the client it will only play for the client.
thats what i actually meant its just my english bad lol
Okay, I thought you meant parent the Sound Instance to a Server Script.
so the sound must be in LocalPlayer
There’s actually a property SoundService.RespectFilteringEnabled which determines whether a client can have sounds replicate or not. IIRC, in this scenario the sound wouldn’t replicate regardless of the property because its put in each player’s PlayerGui which is not replicated to other players.
Might test it in studio later, but OP should either player in a server script as you suggested or have SoundService.RespectFilteringEnabled
to false and play a sound that’s replicated. May test in studio later just to confirm that is correct. Either way, the sound can’t be in PlayerGui unless every client decides to manually play the sound just for themselves.
The issue has been solved, just realized a Local Server only plays for one cilent and we were testing on that.
It’s probably not a good idea to have RespectFilteringEnabled
set to false, because then Clients can exploit and spam sounds.
It seems it’s best to create and handle sounds on the client, have the client play sounds when the server tells them via RemoteEvent.
For things like sound effects, I would play the sound locally for the player [that fired the sound effect], then tell the server via RemoteEvent, then the server will then tell the other clients. This would avoid the web call delay for the local player.
Yup, it’s better for creating individual boombox mutes and stuff like that too.