Change Sound Behavior in ReplicatedStorage

I found out the hard way that sounds sitting in ReplicatedStorage autoload just sitting there doing nothing but wasting memory. That’s fine if you have a few sounds but we were getting up to 50+ sound effects and 10+ songs and that adds up. So, we codified them all and they’re in a module now.

As far as I can tell, every other asset type has to be parented somewhere like Workspace or Playergui to actually be loaded. The expected behavior to me, would be that sounds would not be loaded until manually preloaded or parented to a location like Workspace, SoundService, or PlayerGui. But this is not the case.

I also found out the hard way, that sounds can play from ReplicatedStorage which also seems like unintended behavior to me. I had enemy character models that played a looping sound to warn you of their presence stored in ReplicatedStorage for shop display and gameplay purposes. I had Looping and Playing set to true for easy cloning and parenting from ReplicatedStorage. Then as I was walking around in the world, I could hear their sounds even when they weren’t cloned in. It took me a while to figure out what was going on and change it.

Is this behavior actually intended, and do people rely on this behavior? I personally would like to see it changed for consistency.

6 Likes

i have never needed to play a sound in replicated storage, nor heard of anybody who has, sounds like unintended behavior to me!

1 Like

I do play sounds in ReplicatedStorage when I don’t need the sounds to be heard physically in the world, in cases like your example where I want to play a sound on an NPC and I need to parent it to ReplicatedStorage, I simply stop playing the sound.

I just do this for organization, because I believe workspace should only contain assets that represent the playable content that can be seen in 3D. I could be wrong for doing this either way.

1 Like

Hey @Sethalonian – unlike Parts, which are only visible in Workspace, Sounds are playable from anywhere in the DataModel

When a Sound is in ReplicatedStorage, we have to assume somebody might :Play() it; there are a large enough number of developers who do play Sounds from ReplicatedStorage that we would need extensive communication in advance before taking it away :grimacing:

The newer AudioPlayer API has an AutoLoad property, which can be set to false for any sounds that aren’t mission-critical (don’t have to be loaded right away or ever) – that might be an option but I recognize it can be a lot of lift to rework

1 Like