Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

[easy] why is this error happening?

Asked by 4 years ago
Edited 4 years ago

here is the code:

local clone = script.Parent:Clone()
clone.Parent = game.Workspace
clone.CFrame = clone.CFrame * CFrame.new(0,0,-5)

the error is startScript re-entrancy has exceeded 3 and it says it is happening on line 2 plz help

1 answer

Log in to vote
3
Answered by
raid6n 2196 Moderation Voter Community Moderator
4 years ago
Edited 4 years ago

You'll have to do clone.SCRIPTNAME:Destroy(), because when it clones the parent, it will also the clone the script, and then erroring.

You can also just change the script's parent, which will make it simpler.

Ad

Answer this question