Roblox Audio

TabooHarmony/roblox-brain/skills/gameplay/roblox-audio

by TabooHarmony38826be57ee37bcf023e9c2b85681bea3909281cNo licenseListed Oct 9, 2026Updated Oct 9, 2026

Use when implementing Roblox audio playback, spatial sound, music, sound effects, SoundGroups, or dynamic audio effects.

Instructions onlySoftware Development
AI-generated overview

Guides Roblox audio implementation: playback, spatial sound, music, sound effects, SoundGroups and dynamic effects.

What it does
Provides reference guidance for implementing audio in Roblox experiences, covering both the legacy Sound/SoundGroup/SoundEffect system and the newer modular AudioPlayer/Wire system. It explains sound placement for volumetric, point-source and global audio, SoundGroup mixing and ducking, one-shot sound effect patterns, preloading and common pitfalls. A bundled reference file holds detailed examples, an effect table and client-side patterns.
When to use it
Use when adding or debugging audio in a Roblox project, such as background music, 3D or spatial sound, sound effects, audio mixing or dynamic effects. It suits both legacy Sound objects and the newer modular audio system.
Requirements
No scripts are included; it is instructions plus a reference document. It assumes a Roblox development environment with Luau and Roblox Studio or runtime APIs, and network access to Roblox asset IDs for audio playback.

Roblox Audio

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:

luau
local s = Instance.new("Sound")s.SoundId = "rbxassetid://ID"; s.Looped = true; s.Volume = 0.25s.RollOffMode = Enum.RollOffMode.InverseTapereds.RollOffMinDistance = 10; s.RollOffMaxDistance = 100s.Parent = SoundService; s:Play()

SoundGroups (mixer): Nest SoundGroup under Master for player-adjustable Music vs SFX volume. bgMusic.SoundGroup = musicGroup. Effects (ReverbSoundEffect, EqualizerSoundEffect, CompressorSoundEffect, etc.) parent to Sound/SoundGroup. Ducking: CompressorSoundEffect with SideChain = sfxGroup on music.

New Modular: 2D: AudioPlayer → Wire → AudioDeviceOutput. 3D: AudioPlayer → Wire → AudioEmitter (on Part). Studio/plugin-only SoundService.DefaultListenerLocation controls the default listener; wire an explicit AudioListener for runtime control.

One-Shot SFX:

luau
local function playSFX(parent, id)    local s = Instance.new("Sound"); s.SoundId = id    s.RollOffMode = Enum.RollOffMode.InverseTapered    s.RollOffMinDistance = 10; s.RollOffMaxDistance = 80    s.Parent = parent; s:Play()    s.Ended:Once(function() s:Destroy() end)end

Preload: ContentProvider:PreloadAsync({sound1, sound2}). Client SFX: FireClient → OnClientEvent creates invisible Part + playSFX.

Pitfalls: Server sounds have latency → play feedback on client. Default RollOffMaxDistance=10000 studs → set explicitly. Volume > 1 clips. Rapid-fire → check IsPlaying. Always Destroy() one-shots after Ended.

See references/full.md for detailed examples, effect table, and client-side patterns.

Source and attribution

Source:TabooHarmony/roblox-braininskills/gameplay/roblox-audioat commit38826be

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal