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

PreloadAsync does not work for ServerStorage and the assets stored in it?

I have 2 decals stored in ServerStorage temporally for later use in the game. The assets, when moved to workspace take some time to load, this causes there to be a short but noticeable gap between the moving and loading, when I try to preload assets, it throws an error.

I used PreloadAsync to preload them as shown below but it throws an error every time I try.

game:GetService("ContentProvider"):PreloadAsync(5242825907, 5242817868)

I tried changing the ID's to the actual strings under "Texture" in the Decals, preloading the entire model the decals are attached to, but it keeps on throwing errors, I'm lost on how to preload them in ServerStorage, is there a way to do it or do I have to keep them in the workspace to preload them?

1 answer

ContentProvider:PreloadAsync takes a table as its argument, and you're passing 2 values, you need to make a table with them:

game:GetService("ContentProvider"):PreloadAsync({5242825907, 5242817868})

3 comments

0

I tried this before, it throws "Unable to cast double to Content" error.

0

Tryed exactally like I posted? you may have written something wrong

0

Exactly like that, not sure what's wrong with it, every article I read about PreloadAsync states to do something like that, but yet none work.

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