Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to wait for audio to be loaded?

Asked by 3 years ago

So I know I could use .IsLoaded but every time I try and use that, it gives me an error saying "attempt to index boolean with 'Wait'". I also have a print to tell me the loaded song's time length but that never prints.

            Songs:NextSong()
            Radio.IsLoaded:Wait() --the issue
            local duration = Radio.TimeLength
            print("[SONG DURATION] "..duration)

Answer this question