Module · Engine client only
audio
Play your mod's sounds and music. Needs the "audio" permission. Sounds follow the player's own volume settings.
audio.music(path: string, options?: any): Sound
client onlyneeds audio
Plays music: looping, not placed in the world, and on the music mixer.
local theme = audio.music("music/theme.ogg", { volume = 0.5, fadeIn = 2 })audio.play(path: string, options?: any): Sound
client onlyneeds audio
Plays a sound. Leave out position for a sound you hear wherever you are.
audio.play("sounds/click.wav")
audio.play("sounds/thruster.wav", { position = block.position, loop = true, volume = 0.6 })audio.stopAll()
client only
Stops every sound this mod is playing.