What you’re saying is that you shouldn’t disable SoundService.RespectFilteringEnabled
, since exploiters then can play nasty sounds in-game which everyone can hear. Isn’t it exactly the same since you’re just asking the server to play this song for everyone?
As OP has stated, they do not want to disable RespectFilteringEnabled
as exploiters can use this, and they want some sounds to stay local. (For example: gun shots, ui clicks etc.) @Ethanthegrand14 if you want to accomplish this, you will have to fire a RemoteEvent from the client.
But, if you also want to prevent bad songs from being played, you should probably add a whitelist system to see that the song is allowed to be played on the server.
For example:
-- // This code is for demonstration purposes only
----
-- List of allowed sounds
local AllowedSounds = {1234, 5678, 9012, 3456};
-- Event to replicate the music
.OnServerEvent:Connect(function (player, music)
-- If the music is in the AllowedSounds list, then...
if music isIn AllowedSounds then
-- Let all the clients hear it
remote:FireAllClients("play", music)
end
end)
Also only fire the sounds you want the other clients to hear 