roblox-audio
Installation
SKILL.md
When to Load
Load when implementing audio playback, spatial/3D sound, background music, sound effects, audio mixing (SoundGroups), or dynamic effects. Covers both legacy Sound objects and the newer modular AudioPlayer/Wire system.
Quick Reference
Two Systems: Legacy (Sound/SoundGroup/SoundEffect) — simpler. New modular (AudioPlayer/AudioEmitter/Wire/AudioDeviceOutput) — preferred for new projects, required for voice chat.
Sound Placement: BasePart child → volumetric. Attachment/MeshPart → point source. SoundService/Workspace → global (BGM/UI).
Legacy Setup:
local s = Instance.new("Sound")
s.SoundId = "rbxassetid://ID"; s.Looped = true; s.Volume = 0.25
s.RollOffMode = Enum.RollOffMode.InverseTapered
s.RollOffMinDistance = 10; s.RollOffMaxDistance = 100
s.Parent = SoundService; s:Play()