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

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