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

need help with ContentProvider:PreloadAsync?

I'm not sure if that's how to use this service, I followed some parts on the devforum and it's kinda confusing, maybe just a little

local contentprovider = game:GetService("ContentProvider")
local assets = {}
			local gameparts = game:GetDescendants()
			for _,v in pairs (gameparts) do
				table.insert(assets,v)
				for i = 1, #assets do
					local parts = assets[i]
					contentprovider:PreloadAsync({parts})
				gui.Frame.TextLabel.Text = "Loading...("..i..")"
				if i == #assets then
				gui.Frame.TextLabel.Text = "Loaded!"
				wait(.5)
				end
end
			end

1 answer

Just add the assetids in the assets value and separate them with commas.

Example: local assets = {2522774790,73737627}

2 comments

0

what?

0

@ivorfy in your assets value there is an array, inside that array you need to add the assetids of what you need to upload separated by commas, if you don't know how to get a texture id just google it, heres a wiki link that says how to get it for a decal. https://developer.roblox.com/en-us/api-reference/property/Decal/Texture

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