Sounds are playing when inside ReplicatedStorage

Reproduction Steps

  1. Insert any sound in ReplicatedStorage with Playing property on

  2. Run

Expected Behavior

The sound is playing when inside ReplicatedStorage

(Objects inside ReplicatedStorage must have no interaction with the client. Only when in the workspace)

Actual Behavior

The sound should not play when inside ReplicatedStorage

Issue Area: Engine
Issue Type: Other
Impact: High
Frequency: Constantly

Just do sound.Playing = false

from what I’m aware, this occurs for the server storage too. Can you test this out for me?

You do realize that not all sounds are intended to be played in 3D space, like User Interface SFX, for example? Of course, it could be better to use SoundService for those scenarios, but some people use ReplicatedStorage as the main source of Instances for organization purposes. “Fixing” this would most likely cause a lot of games to see unexpected behavior by sounds completely not playing. I don’t know, but the cons completely obliterate the pros in this case :woman_shrugging: This issue can easily be avoided so easily, just by setting the Playing property to false and setting it to true whenever you need to, instead of relying on Roblox to play it or not based on whatever it is parented to.

IT is an exact science and what is an error is an error and not more or less an error.
There is no point in objects located in ReplicatedStorage interfering with 3D space.
And in the documentation ReplicatedStorage | Roblox Creator Documentation there is no information that objects in ReplicatedStorage will affect 3D space.

“Some people”… how many? Which are?
There is no justification for avoiding a bug fix so that this fix could impact some experiences that erroneously took advantage of this bug.

Good afternoon!

Your observations are correct, and I understand the confusion. Unlike Parts, which are not visibly-rendered outside of workspace, Sounds are playable from just about anywhere.

We can revisit this choice; however, since it has been this way for quite some time, changing it would impact many developers relying on the current behavior.

So at least for the time being, this is intended – your scripts will have to explicitly :Play() sounds, or set .Playing to true.

6 Likes

I am not sure if you understand what I am saying. Certain sounds like User Interface SFX need to be 2D (right and left ear producing the same volume evenly) instead of 3D (which makes the volume in your right or left side louder or quieter, based on the location of the part and the position of your camera.) 2D audio is a MUST, but one thing I can agree on with you is that it maybe shouldn’t be in the ReplicatedStorage, and in a more appropriate location, like Workspace (only for 3D sound, as I explained) or SoundService (only for 2D sound). Even though I do not have the knowledge of knowing how each and every single developer is storing their Sound instances and using them, it is logical enough to assume that the number is CERTAINLY above 0. You wanting to fix some silly mistake (which can be avoided by ONE property change), by having developers relying on this behavior having to move them to a different location and go through a lot of scripts just to update the variable paths to the Sound instances, is really questionable, but you do you I guess :alien:

The proper way to use sounds stored in this area is via SoundService.PlayLocalSound. This will prevent replication from playing the sound as well. ReplicatedStorage isn’t necessarily the only place where sounds can be stored or played for that matter.

1 Like

Provided SoundService.RespectFilteringEnabled is true, it is also valid to :Play() or change .Playing from a LocalScript, or from a Script with Client RunContext – the Server has no knowledge of changes being made locally, so this will only be heard by whichever client triggers the change

PlayLocalSound essentially creates a local clone under the hood – it can be useful for oneshot “fire and forget”-type playback, but if you need to check the TimePosition of a sound while it’s playing, it may not be a good fit for every scenario

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.