The current identity (5) cannot Class security check (lacking permission 6)

I’m trying to make an anti-lua virus scanner, and everytime I try to use the RemoteFunction using “game”, it always creates an error saying " [The current identity (5) cannot Class security check (lacking permission 6)]" Can someone please help me solve this problem, that would be great!


ScanButton.Click:Connect(function()
	for i, v in pairs(game:GetChildren()) do
		script.Parent.Scan:Invoke(v)
	end
end)

It means you can’t access that script which is probably a CoreGui script

1 Like

Some services in the DataModel are locked by Roblox - in other words nothing can access them, not even plugins. Only Roblox scripts can. You might wanna wrap this in a pcall.

2 Likes

I’ll try that out! (30 character limit)

This is what you can do instead.

local children = game:GetChildren()

for i = 1, #children do
    local ok, service = pcall(function()
        return children[i]
    end)

    if ok then -- Proceed with scanning service
        
    end
end

Also by the way, BindableFunctions are meant for returning things back to the caller. If you will not return anything (you are throwing away the return value in your script), use a BindableEvent instead.

Thanks for the help!

-doyouevenbruh33

The problem is, is that when your trying to get all descendants in the game index. Roblox locks some of the classes that cannot be found in a plugin.

The problem is that you cant do GetChildren on the game itself.

game:GetService("RbxAnalyticsService"):GetClientId()

image
so uh why does roblox lock this?
i think if its not locked then we can hardware ban players