You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
localroblox=require("@lune/roblox")
localgameFile=fs.readFile("place.rbxl")
localgame=roblox.deserializePlace(gameFile)
localmodel=game.Workspace.ModellocalmodelFile=roblox.serializeModel({ model })
fs.writeFile("model.rbxm", modelFile)
As of Lune version 0.7.2 this will always generate a completely unique model.rbxm file, which can be problematic when many models are extracted from a place using an automated process, and then stored in version control.
The root of the issue is that writing a model file will clone the instance within the same dom before transfer out into the dom that will then be written to the model file. This leads to unique id collisions, and new ids being generated (source). Relevant methods in our roblox library - from_instance_array, clone_into_external_dom
This could be solved by rbx-dom (#282, #284), but we could also solve the first linked issue here ourselves in Lune by stripping unique ids in from_instance_array.
The text was updated successfully, but these errors were encountered:
As of Lune version
0.7.2
this will always generate a completely uniquemodel.rbxm
file, which can be problematic when many models are extracted from a place using an automated process, and then stored in version control.The root of the issue is that writing a model file will clone the instance within the same dom before transfer out into the dom that will then be written to the model file. This leads to unique id collisions, and new ids being generated (source). Relevant methods in our
roblox
library - from_instance_array, clone_into_external_domThis could be solved by rbx-dom (#282, #284), but we could also solve the first linked issue here ourselves in Lune by stripping unique ids in
from_instance_array
.The text was updated successfully, but these errors were encountered: