Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I preload sounds that are in a folder? Can't figure this out for the life of me.

For some reason my game audio sometimes doesn't play for some users, so I figured I may have to PreLoad it. What I mean by "doesn't play for some users" is sometimes when a user joins a server and a sound is supposed to play across the Server, it plays for most people but sometimes doesn't play for random people. The only way for them to fix this is, is to rejoin the game. It's never a specific audio, it's random each time.

The problem is, PreLoading it still doesn't seem to be fixing the issue. I can't figure out why, I've tried many ways but this is the latest one:

game:GetService('ContentProvider'):PreloadAsync({workspace.AudioToLoad})

"AudioToLoad" is the name of the folder that the audio is in.

Thanks.

1 comment

0

Have you tried putting the folder in ReplicatedFirst?

1 answer

{workspace.AudioToLoad} creates an array with the folder. This is not what you want. Instead, use the GetChildren method, which returns a table with every child in it.

game:GetService('ContentProvider'):PreloadAsync(workspace.AudioToLoad:GetChildren())

This discussion is preserved as it was. New answers, comments, and votes are closed.