Plays music in a zone

So I was too annoyed for this music to play everywhere in the player’s ears. So I decided it would be good to make a music zone. But I don’t know anything about making zones. So I decided to look through the forum but can’t find anything that would work out. So I decided to make this instead. But it wasn’t efficient enough. Basically, I did this

part.Touched:Connect(function()
	music:Play()
end)
part.TouchEnded:Connect(function()
	music:Stop()
end)

But it plays the sound twice. So are there any other ways I can replicate that script?

When looking up ‘roblox music zones’ on YouTube, these are the first 5 results that showed up:

Perhaps this is what kind of zone/area music system you’re looking for and one of these might be useful :thinking:

1 Like

Region3 should be more affective

Try checking if the sound is already playing, so we don’t repeat the sound.

part.Touched:Connect(function()
	if music.Playing == false then
		music:Play()
	end
end)

part.TouchEnded:Connect(function()
	music:Stop()
end)
1 Like