Unable To Clone Children To Parts

I want the objects in the MainBlock to be cloned and sent to every other Block. For some reason, it does not work.

The objects get cloned to one Block but it doesnt do it for the rest. Sometimes it works entirely…

I dont really have a solution, but I hope you can help!

Error;
Workspace.Tower.DuplicateScript:5: attempt to index nil with Parent

Code;

for i,v in pairs(script.Parent:GetChildren()) do
	if v.Name == "Block" then
		for x,y in pairs(script.Parent.MainBlock:GetChildren()) do
			if y then
				y:Clone().Parent = v
			end
		end
	end
end

Explorer;
Screenshot 2024-03-15 190635

1 Like

Do any of the Instances have the property Achivable set to false? This property makes it so the instances cant be cloned, which would explain your error message.