mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-20 17:41:37 +00:00
Skip reparenting if parent is the same
This commit is contained in:
parent
c0f4b31ab3
commit
e9d33bdc02
1 changed files with 4 additions and 0 deletions
|
|
@ -10,6 +10,10 @@ end
|
|||
|
||||
local function reparent(rbx, parent)
|
||||
if rbx then
|
||||
if rbx.Parent == parent then
|
||||
return
|
||||
end
|
||||
|
||||
-- It's possible that 'rbx' is a service or some other object that we
|
||||
-- can't change the parent of. That's the only reason why Parent would
|
||||
-- fail except for rbx being previously destroyed!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue