Currently I’m trying to make a gun and of course it needs to play the gunshot sound. What I did is that everytime they click it FireServer and then on the server it FireAllClient which plays the sound on another local script. The problem is that it still lags, is there any other way to do this?
At some points it plays, but then just stop randomly but play again. Like shoot sound plays for 3 seconds but then stops for another few second and repeat.
I’m lost for ideas on this one sorry, however quick recommendation, you should play the sound on the server instead of firing all clients to prevent exploiters spamming the sound event and have some check in place.
I suspect its your gun script possibly using functions that slow down the process. Could you possibly attach how you are triggering the fire server event.
You could play the sound locally and have it replicate server-sided. (the server could tell all other clients to play the sound, excluding the player firing the gun.)