Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

how to the fix cannot Class security check lacking permission 6 error?

Asked by 2 years ago

the script is a server script and inside serverscriptservice

for i,target in pairs(game:GetChildren()) do
                    if target:FindFirstChildWhichIsA("Humanoid") then
                        if target.Name ~= player.Name then
                        if (target.Character.HumanoidRootPart.Position - player.Character.HumanoidRootPart.Position).Magnitude < 15 then

                            local hole = script.FloorPortal:Clone()
                            hole.CFrame = target.Parent.HumanoidRootPart.CFrame * CFrame.new(0,-3,0)
                            hole.Orientation = Vector3.new(0, 0, -90)
                            hole.Parent = workspace

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

0
Orientation is not a changable property in scripts. Use hole.CFrame = CFrame.Angles(math.rad(objDegX), math.rad(objDegY), math.rad(objDegZ)) ryanzhzh 128 — 2y
0
how come? i have used orientation in scripts before and it has worked Not_prototype 50 — 2y

Answer this question