Unable to cast to array -> Sound

I have recently made a proximity prompt where if you click it, a sound will play. And I heard that every sound that you have needs to be loaded with the contentProviderService using the :PreloadAsync() function but when I play it gives me the error unable to cast to array. What is the issue?

Note: I’m using the sound on multiple proximity prompts.

1 Like

ContentProvider:PreloadAsync() takes an array of IDs as a parameter, not just a single ID.
If you want to preload one ID, you can put it in a table ({ID_HERE}), and call PreloadAsync with that.

1 Like

Turns out to be working, thanks!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.