Insert assets from toolbox at original position

As a developer, it’s very challenging to insert models/tools/etc. (assets) from the toolbox with the original offset preserved. Many assets are built on a grid that starts at the origin, be it a 10 stud grid, 1 stud grid, or 0.2 stud grid. Whatever the grid may be, a model that is built on a grid can be translated and rotated onto any other grid. The toolbox removes this grid from the model. From now on, I’ll refer to models and operations that exist on a known grid as ‘incremental’ and models and operations that are removed from a known grid as ‘non-incremental.’ The toolbox’s use of getInsertPosition() and subsequent Model::MoveTo() operation are non-incremental; they do not preserve any sort of grid, making it difficult or impossible to precisely align the models to a grid without a knowledge of CFraming and the command line.

To circumvent the Toolbox’s non-incremental I use InsertService::LoadAsset() to load most models. LoadAsset I know is incremental because I can LoadAsset models exactly where they were published from, which is not possible with the toolbox. This works fine for my own models, but LoadAsset returns 403 on someone else’s models, even if they’re free, so this is not a full solution.

Taking matters into my own hands, I attempted to insert the model with the same method the toolbox uses (but skipping :MoveTo()) with the following command:

local url =  "rbxassetid://579339973"
local assetInstance =  game:InsertObjectsAndJoinIfLegacyAsync(url)
for _,o in ipairs (assetInstance) do
    o.Parent = game:GetService("ServerScriptService")
end

Unfortunately, InsertObjectsAndJoinIfLegacyAsync is limited to script permission level 5, and the command line only operates on script permission level 4, so this is a non-starter. I assume all the built-in plugins are signed or otherwise locked so they can’t be modified, so I haven’t tried patching the method to skip :MoveTo() and saving over the plugin to get incremental models that way, and even if it isn’t locked, I would have to reinstall the plugin every time studio updates.

I am doing refurbishment of old models and it’s important to me that the parts in the model are as close to the originals as possible.

8 Likes