I have tried this many times in the past but mostly failed, either that or it sounds bad, can someone please tell me how to do this, I do not have a code to showoff, I just want an example code.
COMMUNITY QUESTION
How do I make sound enivironments? (I.E; Music in diffrent areas)
2 answers
You can have different parts with sounds inside, and set the range that they can be heared from. It's the simples way to do it, and the most unlikely to break.
There is a property of a sound called MaxDistance which determines at what distance from the sound (in studs) the player can hear the sound, and if they go beyond that distance they will not hear the sound. You can do this with multiple sounds like so:
local part = script.Parent
local part2 = script.Parent.Parent.Part2
local sound1 = Instance.new("Sound")
sound1.SoundId = "rbxassetid://000000000"
sound1.MaxDistance = 50 -- Can be heard from up to 50 studs away. If a player goes beyond this range they will not hear the sound.
sound1.Volume = 1
sound1.Pitch = 1
sound1.Looped = true
sound1.Parent = part
--[[
The first part is 101 studs away from the second part. Keep that in mind.
--]]
local sound2 = Instance.new("Sound")
sound2.SoundId = "rbxassetid://000000000"
sound2.MaxDistance = 50
sound2.Volume = 1
sound2.Pitch = 1
sound2.Looped = true
sound2.Parent = part2
game.Players.PlayerAdded:Connect(function()
local plrs = game.Players:GetPlayers()
if #plrs > 1 then return end
sound:Play()
sound2:Play()
end)
If you have any questions, please ask them. (Also, please note that MaxDistance will only work if the sound is parented to a Part or an Attachment.)
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
u put sounds in objects in workspace to give them actual 3d effects
Region3?