Login
Community
DARK THEME

Music Duration Reset

Hello, I would like to reset a song that I am using in my game (that is, after it ends set its duration to 0). I do not want to loop the song, but I want it to be set to 0 so when it plays again it will start from the beginning.

If you save your music in a variable (e.g. Song1 = audio.playMusic("song1")) you can use the .setPosition(position) argument. It is undocumented, however, it exists. I found it via print-ing the music object.

Thank you!

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community