How do I make some sounds not play inside buildings/the further you get away from the part the louder it gets?

  1. What do I want to achieve?

a) I have a game with 2 islands with buildings surrounded by water. My objective is to make the atmospheric sounds I added (wind and water) not play in a building. For wind, I want it to play everywhere OUTSIDE but for water, I would like to make it play only when the player is close to the water on the edge of each island.

  1. What is the issue? Include screenshots / videos if possible!

a) The sounds play everywhere, even in buildings. According to ChatGPT (yes it’s a terrible way to get information I know), Roblox does not play sounds/distorts them when there is a closed space, provided that the sound is not parented to soundservice. That is, of course, wrong.

Here is a picture of the map I have:

I want the sound to play on the edges of each island.

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

a) I’ve tried parenting the sounds to parts, but this is a bad method as my map is longer than 2048 studs on the X and Z axis. Equally, I can get the water sound to play when the player is by a stream or an area I want but I’m not a huge fan of it as sounds may overlap and there will be a lot of regions to add these parts to. As for wind, my intention is to have the sound play at a constant volume but not play in closed spaces such as buildings.

I think that this issue would affect a lot of developers, so I’m really curious to see how the majority of people handle it.

Thank you for your help in advance, I appreciate it.

3 Likes
1 Like

Hi, sorry, I think there might be a misunderstanding.

My issue is an attempt to make sounds only play for the player when they are outdoors, not in a building. That is for all sounds.

For the water sound, I just want it to not be played in a building (same for the wind sound) but also to only be played when the player is close to water.

I think what you have posted is a system where the way the audio is played changes based on the player’s direction, to show where the sound originated from. That was not my intention.

1 Like