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

'The current identity (2) cannot Class security check (lacking permission 6)'?

So i made a loading script that loads through everything, but then it said 'The current identity (2) cannot Class security check (lacking permission 6)'

local Frame = script.Parent.Parent.Frame

Frame.Visible = true
local ContentProvider = game:GetService("ContentProvider")

for i, instanc in pairs(game:GetChildren()) do
	ContentProvider:PreloadAsync({instanc})
	Frame.Dot.Text = "Loading ".. instanc.Name
	wait(4)
end

1 answer

✓ Accepted answer

Hello.

The reason it says that is that ContentProvider:PreloadAsync() requires a table, not a single instance. Try this:

local ContentProvider = game:GetService("ContentProvider")

ContentProvider:PreloadAsync(game:GetDescendants())

Also, use game:GetDescendants() so that it loads everything in the game.

2 comments

0

Ohh..

0

Nevermind. I found a solution. Try it again.

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