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

local Debounce = false
	if Debounce == false then 
		Debounce = true
	for i , v in ipairs(enemypart.Parent.Parent:GetDescendants()) do
		if v.Name == "Aim" then
				script.Parent.Parent.Union.CFrame = , v.WorldPosition *,1,0) )
		Debounce = false

When I try to run my script It gives me this error:
The current identity (2) cannot Class security check (lacking permission 6)

Are you sure you’re not indexing datamodel with enemypart.Parent.Parent?

1 Like

What do you mean by that? im kind of new to scripting. :confused:

@BenMactavsin Is trying to say if enemypart.Parent.Parent is indexing game, a datamodel, somewhere inside try adding a print(enemypary:GetFullName()) to see if that’s the case. If so, you may need to do some checks to see if enemypart’s 2 parents don’t lead to game

Oh, now I get it, What happened was that the part accidentally touched the baseplate

That would the case since the Parent of the parent of baseplate is game, which scripts lack permissions to mess with it, and because all of its properties are readonly as well and you’re trying to create a new property in game, which again, scripts lack

1 Like

That is not properties, what is likely happening is this:

enemypart.Parent.Parent is likely the DataModel, but there are some protected services under it, like CoreGui, that game scripts can’t access. So there is an exception for trying to access it.

Make sure that enemypart.Parent.Parent is not the game, because you do not have access to the core components