What's the best way to fire a sound in a FPS game?

  1. Goal To have a sound fire to the server smoothly
  2. ISSUES Currently I have a remote event fired to create a new instance “Sound” and play it in the server. Sometimes when there is internet issues sounds may sound a bit clunky. And there is a lot of remote events being fired because this is a gun.

What is the best way to approach this?

Thanks!

2 Likes

You can just turn off the > game.SoundeService.RespectFilteringEnabled = false

Please do not do this, any exploiters will then be able to fire the sound and abuse it so that the entire server has to listen to what they play.

My idea would be to fire a remote and have the server do some sanity checks to ensure that its not being abused then have the remote send the sound that needs to be played to all the clients. The client would then listen for the remote to be fired by the server then play the appropriate sound.

2 Likes

I am still having issue, im guessing the problem is because I’m calling too many remotes since this is a gun game? Looking for more efficient ways to fire sound from local script into server

Basically trying to fire sound from local to server in rapid succession.

I mean you can always choose a model of displaying the sound for the client and the server. Such that the sound plays from the local script, all while having the server fire the clients who aren’t the player to play the sound for them locally (too). Sanity checks on the local side are pointless, and afterall as it only affects the local player it doesn’t matter.

Of course I haven’t tested this at all so I wouldn’t know the result, but if you are looking for a responsive experience for the player then I don’t really see any other way (aside from making that baseline system more advanced).

With the issue of firing many times, if its something like holding down an automatic gun you can just have it enable and disable a constant firing effect. Unless the issues coming from merely shooting with clicks.