How to play different ambient sound in different areas?

Hello
I would like to play different ambient sound in different areas of the map. What is a proper way to do this?
I am thinking about putting invisible parts at the “doors” between areas and create a Local Script which listens for the Touched event. When the local player touches the part I will stop the current ambient sound being played and will start playing the new one (with PlayLocalSound function? )
What do you think about this?
Is there a better way?

Thank you

This might help you: ZonePlus v3.2.0 | Construct dynamic zones and effectively determine players and parts within their boundaries

Thank you
So if I understand correctly, when I use “zones” in LocalScript this would be more performant compared to when I use Touched event in a LocalScript?
One more question - If I play a Sound (parented under SoundService) inside a LocalScript it will play only on the current client? No need to specifically parent the Sound to something like PlayerGUI?

Yes, it is more efficient and reliable.

If you play a sound from a local script, it will only play on the current client.

I would imagine you want Regions where each one plays a different sound when you are inside of it… the problem with the doors is that you limit where your characters can go, they will have to “touch” these doors when they come and go, and this isn’t ideal.

Sound regions is your best bet, and i think is easier to implement:

Look specifically at this response that i linked, not the original poster… and this person also provides a file you can use in your experience, with instructions.

1 Like