SoundGroups
RequiresSchema
Reads and adjusts the SoundGroups the library made from your SOUNDS Configuration.
Every group sits under one main SoundGroup named SOUNDS in SoundService, so the main volume scales all of
them.
Functions
Get
print(VluxySF.Groups.Get())
GetByName
local music = VluxySF.Groups.GetByName("MUSIC")
if music then
music.Volume = 0.3
end
GetNames
SoundGroups.GetNames() → {string}--
A new array of every group name.
print(VluxySF.Groups.GetNames())
SetMainVolume
SoundGroups.SetMainVolume(mainVolume: number--
The volume.
) → ()Sets the volume of the main SoundGroup that every other group sits under.
VluxySF.Groups.SetMainVolume(0.3)
SetVolumes
SoundGroups.SetVolumes(mainVolume: number?,--
The main volume, or nil to leave it as it is.
volumes: {[string]: number}--
Group volumes, keyed by group name.
) → ()Sets several volumes at once. A group name that does not exist prints a warning and is skipped.
VluxySF.Groups.SetVolumes(1, {
MUSIC = 0.7,
SFX = 0.5,
})
VluxySF.Groups.SetVolumes(nil, { MUSIC = 0.2 }) -- Leaves the main volume alone.