How do I insert `.rbxm` files using lua (in a plugin)

I am trying to create a system that manages packages. One of the features that it needs is for it to be able to insert .rbxm files into the desired instance. How would I do this?

More info on .rbxm file: RBXM File Extension - What is an .rbxm file and how do I open it?

Hello, did you ever find out how to do this? I’m trying to figure it out and not finding any solutions. I can use

StudioService:PromptImportFile({‘rbxm’, ‘rbxmx’})

to prompt the file explorer opening for rbxm and rbxmx files. But when importing it comes through as a File instance and not the actual object saved to the rbxm and rbxmx.

I quit developing Roblox before I ever got around to this :moyai:

GitHub - metatablecat/lxm

Use this for decoding RBXM files and then just turn it into an instance