Detect "Failed to load sound" errors?

Hello,

I’ve been making a music queue system for the past few days now and I’ve come across an error saying “Failed to load sound [audio id]: Unable to download sound data”, this error breaks the system entirely as the audio isn’t playing.

I have tried using a Pcall but it returns a success (true) instead of an error.

What can I do to detect that it failed to load?

Sound.IsLoaded property can help you with that.

4 Likes