So I’m basically making a loading gui that preloads a table(Im actually using a folder filled with various assets) it’s categorized as animation, audio, textures, important assets. So it’s working as fine, but the problem is, I have tons! of assets and I don’t know how to copy paste all of them without them duplicating in the folder.
Is there a way to like filter objects in the workspace and only show one asset? because I have tons of duplicated textures.
thanks for the code but that’s not necessary in my situation. I’ll explain it as best I can, I have 11 textures, they’re all over the game’s map, I want to get all the 11 texture’s into a Folder, I don’t know how, the filter workspace is showing every texture ive pasted on the map, I just want to see only/filter the 11 textures instead of all the 11 textures pasted all over the map
I wouldn’t do this, you’re essentially going to clone everything, move it to a folder, when it’s done loading, move it to where it was.
A simpler method and solution is to just :PreloadAsync the entire map. (not workspace)
Just put everything and whatever that is important and needs to be loaded inside a folder.
Yes I want to put every asset that I need, but the problem is, I cant individually store all of them one by one because they’re so many. To simply explain for example, I want to preload the color green, but they’re all over the place and cannot all be pasted into a folder because you only need one part with the color green.
Same goes with the assets that I have, they’re so many, I can’t paste all of the duplicated textures into a folder because that would be massive, I only want one of each texture
I don’t understand what you’re trying to do. If “they’re so many”, then why don’t you just load the entire thing? You do know that you don’t have to do :PreloadAsync(“Green”, “Texture”, “bla”, “bla”).
Just :PreloadAsync(map) – assuming map is a folder and it’ll load everything.
Duplicated textures isn’t really an issue, cause it loads for the rbxassetid.
Sorry if I’m wrong, I’m just not understanding why you can’t do :PreloadAsync(map). Could you explain more about why?
usually if you want to preload assets, you use the preload service on folders containing examples for all the assets you wish to preload somewhere in storage
Cheap way of making these is to go through all things in the game and fill up folders with instances of specific types using a script
Also, if you want to make a progress bar without using the preload queue size thing, you can preload each object individually in the folder or each folder individually
No I’ve already done that before I even posted this post, everything, the only thing I need to copy paste is all the textures, but they’re literally over a hundred duplicates. I want to only copy 1 and paste a texture for each ID
If you use a script you can do this by using a dictionary as if the id is already in the table, it will not be added like an array. then you can just put duplicates of all items in the dictionary into the folder (or place a duplicate of the asset if one hasnt been made already (not in the table) during the loop)
Example:
local lookup = {}
local addAsset = function(object, id, parent)
if not lookup[id] then
lookup[id] = true
object:Clone().Parent = parent
end
end
for _, storage in ipairs(storagePlaces) do
for _, object in ipairs(storage:GetDescendants()) do
if object:IsA("Sound") then
addAsset(object, object.SoundId, folders.SFX)
elseif object:IsA("MeshPart") then
addAsset(object, object.MeshId, folders.Meshes)
end
end
end