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 1)'?

What I'm trying to do is to disable the tool bar at the bottom of the screen. Thanks to a little browsing on the devforum I found a solution, however, running this code:

local CoreGui = game:GetService("CoreGui")
CoreGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false) CoreGui:SetCoreGuiEnabled(Enum.CoreGuiType.Health, false) 

Causes the following error The current identity (2) cannot Class security check (lacking permission 1) Any reason why I don't have permission? Am I Missing Something?

P.S. This is all the code; I have one single local script in startergui handling this. Let me know if I'm meant to add anything to this.

2 comments

0

Can you show your script please?

0

This is all of it

1 answer

✓ Accepted answer

In most multiplayer platforms there is a Client -> Server boundary and vise-versa. This is because the server is a different computer to the client. Now onto roblox: In roblox's case, when trying to edit the client from the server, you will have plenty of issues, for example:

plr.PlayerGui.ScreenGui:Destroy()

Will not destroy it and will result in an error, but when ran from a client-sided script or local script it will not do so.

TD;DR use a server script

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