Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

I'm trying to make a part duplicate over and over, but it comes with an error. Fix?

I'm trying to make a part duplicate into a different position, and I inserted the script into the part...

local part = script.Parent

while true do
	local cPart = part:Clone()
	cPart.Parent = workspace.Model --where the error shows
	cPart.Position = Vector3.new(script.Parent.Position.X + 4,script.Parent.Position.Y,script.Parent.Position.Z - 3)
	wait(1)
end

... It works but very laggy, and also it comes out with this...

startScript re-entrancy has exceeded 3.

1 answer

✓ Accepted answer

The problem here is that you have the script under the part, so when your cloning the part, you're also cloning the script, which is why you are getting that error, the only thing that you should do is move that script anywhere else other than under the part you're cloning. Then reference its place and it should work fine.

OR disable the script after you clone.

Hope I helped, please let me know if you have further questions!

2 comments

0

Oh I didnt notice that

0

lemme give it a try

This discussion is preserved as it was. New answers, comments, and votes are closed.