The Parent property is locked

Hello I work on a script, which creates an object and destroys it if the magnetude does not match imagine 50, in short, and in the output it tells me that the parent locked

  • unfortunately I can’t show you the code because I want to show it to you when finished! but I need advice

Hey, so you can’t set the parent of a destroyed item. If you want to temporarily destroy it, I would recommend parenting it to nil, and then parenting it back under another instance later.

do you have a exemple ??? Thanks for you reply

Can I see your code? I can help you integrate it.

inst.Parent = nil -- makes the instance gone for 10 seconds
task.wait(10)
inst.Parent = workspace

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.