Fix use of services as partition targets

This commit is contained in:
Lucien Greathouse
2017-12-07 16:56:20 -08:00
parent 9fd6799f93
commit 23d4f45ac9
2 changed files with 11 additions and 3 deletions

View File

@@ -171,8 +171,13 @@ function Reconciler.reconcile(rbx, item, fileName, parent)
end
else
if rbx.ClassName ~= "Folder" then
rbx:Destroy()
return Reconciler._reify(item, fileName, parent)
-- Certain objects (services) can't be destroyed.
-- If we target one of these, leave it alone!
local ok = pcall(rbx.Destroy, rbx)
if ok then
return Reconciler._reify(item, fileName, parent)
end
end
end