rojo icon indicating copy to clipboard operation
rojo copied to clipboard

Fix PrimaryPart loss during live sync fallback serialization

Open Froredion opened this issue 3 weeks ago • 0 comments

When live syncing .rbxm files containing Models that require fallback serialization (e.g., containing MeshPart or UnionOperation), the PrimaryPart reference was being lost.

The issue occurred in __replaceInstances because the deserialized replacement instance doesn't preserve Ref properties like PrimaryPart. When children were moved from the old instance to the replacement, the PrimaryPart reference was discarded along with the old instance.

This fix saves the PrimaryPart before moving children and restores it by finding the matching child by name in the replacement's descendants.

Fix for this issue: https://github.com/rojo-rbx/rojo/issues/1181

(PS: Untested) (Only copied code from our forked Repo)

Froredion avatar Dec 01 '25 07:12 Froredion