Skip to content

PlayMusic

Plays the background music. Music does not stop when player goes to settings. Music is looped.

Parameters

NameTypeOptionalDescription
audiostringAudio resource

Usage

ts
engine.script({
  start: [action.playMusic("./assets/annoying-melody.mp3")],
});

Released under the ISC License.