Detect when sounds play within an area

Is there any way I could detect when a sound plays within a certain radius without using an in pairs() loop?

you could use:

local areaHitbox = --Your hitbox here
local sound = --Your sound here
local soundPart = sound:FindFirstAncestorOfClass("BasePart")
local distance = (areaHitbox.Position - soundPart.Position).Magnitude
local maxDistance = sound.RollOffMaxDistance

if distance < maxDistance then
print("Sound can be heard in the zone!")
end