SlashCo Wiki

SlashCo.AudioSystem.SetBackgroundMusic

  SlashCo.AudioSystem.SetBackgroundMusic( string soundFile, number volume = 1 )

Description

Sets the current soundFile and volume of the background music.

The volume will fade over 3 seconds when it's changed- it does not set it instantly.
IMPORTANT You should NOT call this function every tick! If you want to adjust the volume every frame use SlashCo.AudioSystem.SetBackgroundMusicVolume

Arguments

1string soundFile

The new soundFile

2number volume = 1