Ad
Log in to vote
0

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

Asked by 9 days 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 56 — 8d

Answer this question