diff --git a/saveinstance.luau b/saveinstance.luau index 85a84f9..3f6ba8d 100644 --- a/saveinstance.luau +++ b/saveinstance.luau @@ -1637,10 +1637,7 @@ local function synsaveinstance(CustomOptions, CustomOptions2) end local currentstr, currentsize, totalsize, chunks = "", 0, 0, table.create(1) - local savebuffer, savebuffer_size = - { - '', - }, 2 + local savebuffer, savebuffer_size = {}, 1 local StatusText @@ -2866,17 +2863,21 @@ local function synsaveinstance(CustomOptions, CustomOptions2) end local function save_game() - writefile(placename, "") + do + local header = + '' if IsModel then - savebuffer[savebuffer_size] = 'true' - savebuffer_size += 1 - end --[[ -- ? Roblox encodes the following additional attributes. These are not required. Moreover, any defined schemas are ignored, and not required for a file to be valid: xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.roblox.com/roblox.xsd" - Also http can be converted to https but not sure if Roblox would decide to detect that + Also http can be converted to https but not sure if Roblox cares -- ? nullnil - is a legacy concept that is no longer used. ]] + header ..= 'true' + end + + writefile(placename, header) + end -- TODO Find a better solution for this SaveNotCreatableWillBeEnabled = SaveNotCreatable