Hi! I previously asked how to clone corridors and i got some good responses, however, the script now seems to give me the error of:
10:33:26.279 Workspace.Script:7: attempt to index nil with 'PrimaryPart' - Server - Script:7
The script used:
local AmountOfCorridors = 0
while true do
local infgen = game.Workspace:FindFirstChild("original"):Clone()
infgen.Name = "notorig"..AmountOfCorridors
local pos =
game:Workspace:FindFirstChild("notorig"..AmountOfCorridors).PrimaryPart.CFrame * CFrame.new(0, 0, 334.464) -- Find the latest created corridor
wait(.1)
AmountOfCorridors = AmountOfCorridors+1
infgen:SetPrimaryPartCFrame(pos)
wait(12)
end
Anyone have ideas? Thanks is advance!
