I think x:ClearAllChildren() should behave like for _,v in pairs(x:GetChildren())do v:Destroy()end instead of repeat x:GetChildren()[1]:Destroy()until #x:GetChildren()==0 so it just destroys its current children instead of destroying one at a time until there aren’t any left.
found this issue in a script builder where I tried running ClearAllChildren on my character while it automatically regenerates.
how can I avoid crashing the server when someone calls ClearAllChildren on my character/torso but limbs and joints are automatically being created and added back on ChildRemoved?