Parent property locked causing script to break

I have a script that loads a Roblox Accessory via LoadAsset and then parent it to the character. This used to work fine, but recently I have been faced with errors such as this one:

I’ve seen other threads about this issue but none helped. If anyone knows a fix to this problem it would be appreciated. I’ve tried adding a wait() before parenting and everything to no avail.

2 Likes

You get this when you reparent an object inside of an event handler related to hierarchy (ChildAdded, ChildRemoving, AncestryChanged, GetPropertyChangedSignal(“Parent”), etc.) or when the object is destroyed and you are still trying to parent it somewhere.

There’s not enough info to help you any further than that, sorry.

2 Likes

He or someone else on Discord brought up this same issue and I assumed the same so I tested AncestryChanged but that’s a different error. Not sure about the others but I imagine it’s the same.

1 Like