saveinstance
Saves an instance and everything under it to a file in the executor workspace.
Signature
saveinstance(instance: Instance, options: { FileName: string? }?): ()Parameters
instanceInstanceThe instance to save.
options{ FileName: string? }?Optional. FileName is the name of the file to write.
Returns
Nothing.
Note
Example
local part = Instance.new("Part")
part.Name = "Saved"
saveinstance(part, { FileName = "saved_part" })
task.wait(0.5)
for _, path in listfiles("") do
if path:find("saved_part") then
print("wrote", path)
end
end