I mean I have a pretty simple solution, but it’s probably not that efficient. Use a remoteEvent to fire the server when a sound request is made by the client, then fireAllClients and receive the signal locally to play the sound.
Would UnreliableRemoteEvents and just sending the raw sound instance across the server be optimized enough? I just thought buffers would be used for performance, but yes there may be a lot of sounds being sent
I was asking whether or not when sending events to the clients to play a sound, Do i need to use buffers to optimize the data being sent at all, like do I need any optimizations to this or no
you cant send instances; you have to serialize them
if you send an uncompressed array with assetid (8B), volume (8B), speed (8B) + 40B for overhead + 40B of other stuff then each sound would send 104B. Sending 100 sounds per second would probably need 10.4kB/s which is fine
if you use a buffer then you can get rid of array overhead and use ints instead of 8B floats. It makes the performance slightly slower but reduces network load
I think for this case, network wont really be strained so you should only use unreliable remote events as a last resort if you cant reduce the network enough
If you dont need fully dynamic sounds you can save alot by predefining sounds (or part of sounds, like ID) on the client and then sending just one number to identify the sound