Audio¶
Nova's audio stack supports 3D Sound playback, SoundGroup mixing, rolloff
modes, and the 2022 DSP effect set.
Basic playback¶
local sound = Instance.new("Sound")
sound.SoundId = "rbxassetid://123456789"
sound.Volume = 0.5
sound.Looped = true
sound.RollOffMode = Enum.RollOffMode.Inverse
sound.RollOffMinDistance = 10
sound.RollOffMaxDistance = 200
sound.Parent = workspace:WaitForChild("Speaker")
sound:Play()
sound.Ended:Connect(function()
print("finished")
end)
Sound:Play, Pause, Resume, and Stop are present. Playing,
PlaybackSpeed, TimePosition, TimeLength, IsLoaded, and PlayOnRemove
work. Setting a different SoundId stops the current voice and hands it to the
new asset, matching modern Roblox behavior.
Aliases¶
Old property names still exist for compatibility:
| Legacy | Modern |
|---|---|
Pitch |
PlaybackSpeed |
MinDistance |
RollOffMinDistance |
MaxDistance |
RollOffMaxDistance |
IsPlaying |
Playing |
play() / pause() / stop() |
Play() / Pause() / Stop() |
Use the modern names in new code. EmitterSize is a deprecated alias of
RollOffMinDistance.
Sound groups¶
local SoundService = game:GetService("SoundService")
local music = Instance.new("SoundGroup")
music.Name = "Music"
music.Volume = 0.4
music.Parent = SoundService
local sfx = Instance.new("SoundGroup")
sfx.Name = "SFX"
sfx.Volume = 1
sfx.Parent = SoundService
sound.SoundGroup = music
SoundGroup is the supported way to implement volume sliders without walking
every sound in the place.
Effects¶
The following effect classes are implemented and are parented under a Sound or
SoundGroup:
PitchShiftSoundEffectEchoSoundEffectReverbSoundEffectDistortionSoundEffectEqualizerSoundEffectTremoloSoundEffectChorusSoundEffectFlangeSoundEffectCompressorSoundEffect
local echo = Instance.new("EchoSoundEffect")
echo.Delay = 0.25
echo.Feedback = 0.35
echo.DryLevel = 1
echo.WetLevel = 0.4
echo.Parent = sound
Effect property names and ranges follow the Roblox classes; check the class page if a property is rejected.
Rolloff¶
Nova's RollOffMode enum currently exposes Inverse and Linear. The modern
InverseTapered and LinearSquare values are not present; check the
RollOffMode page before using them.
For 3D sound, the emitter must be parented under a BasePart or Attachment.
A sound created before parenting re-evaluates its spatialization when it is
parented, so it is safe to configure first and parent later.
RollOffMaxDistance defaults to 10000 (the modern default). If a sound is
audible across the whole map, check that the property was not left at the old
100000 default.
Common problems¶
| Symptom | Fix |
|---|---|
| No sound in Studio | Check IsLoaded, the asset ID, and whether the sound is parented to a 3D emitter. |
| Sound is 2D | Parent it under a BasePart or Attachment, not directly under SoundService. |
| Too loud across the map | Lower RollOffMaxDistance and check RollOffMode. |
| Effect does nothing | The effect must be parented under the Sound or its SoundGroup. |
Old scripts change Pitch and hear nothing |
Use PlaybackSpeed; Pitch is a deprecated alias. |