Im currently making a loading screen that loads ALL assets in the game. I ran into a little problem where I get a error "The current identity (2) cannot Class security check (lacking permission 6) ". Now I think this is do to me accessing something that cant be accessed so I need help on filtering it so I can access everything else. Thanks
CODE:
function loadGameData()
local loaded = {}
for _, object in pairs(game:GetDescendants()) do
table.insert(loaded, object)
end
return loaded
end
function loadGameData()
local loaded = {}
for _, object in pairs(workspace:GetDescendants()) do
table.insert(loaded, object)
end
for _, object in pairs(game.ServerStorage:GetDescendants()) do
table.insert(loaded, object)
end
for _, object in pairs(game.ReplicatedStorage:GetDescendants()) do
table.insert(loaded, object)
end
return loaded
end