Hello, I’ve been recently implementing sounds into my game and I came upon the challenge of replicating sounds from the client to the server.
Basically, I need the client to be able to play/stop sounds for other clients in the game. Disabling “RespectFilteringEnabled” in SoundService is out of the question since it could allow exploiters to spam unwanted sounds.
This leads me to the option of using a RemoteEvent to replicate sounds but they can also be exploited without doing countless sanity checks. Is there an easy and secure way to replicate sounds from the client to the server? How do bigger games do this?
I have multiple cases where I want specific sounds to be played to everyone else at specific times when the client does something. One example is reloading sounds. In my game, I want certain reload sounds to play when a certain keyframe is reached in a reload animation. I want the sound to be played on the client who is playing the animation and also be replicated to other clients.
Then i don’t see what is exploitable here if this happens when they are just reloading a gun? Do you have a separate remote for playing sounds? If so that might be where the exploits come in.
you can detect animations from a client script, so there’s no need for remote events.
detect when an Animator starts playing an animation track, and use a signal to detect when an animation marker is reached. then, use the info to check what sounds and effects to play.
sorry, just realized this post was here for 5 years. have you found a solution?
There’s no 100% secure way of doing it, just use remote events and add a cooldown to how often you can play/pause basically.
Sound IDs aren’t replicated as far as I know anyways so those need to be set on the server regardless.
I don’t exactly see the point in securing something as simple as sounds besides just adding simple spam prevention (for auto-clickers).
It could be that you’re overthinking the whole security thing, I haven’t seen that many exploiters lately and I doubt if one is even willing to spam a sound effect, of course they may attempt it but what’s the point besides annoying a few users really?
I think just general anti-clicker prevention does good enough of a job.
Exploits are almost impossible to detect in this context.