Delete every element except one

  • Fuuu47
    23rd Jun 2020 Member 0 Permalink

    I want to know if there is a console command that allows to delete every other element except one in specific. For example, I'm on a save and I only want the parts made with SPNG, but deleting every other parts made with other elements one by one would be tedious and boring, so there's a command to make that quicker and easier?

    Thanks!

  • LBPHacker
    23rd Jun 2020 Developer 0 Permalink
    You need Lua for that. The long-winded way of doing this is for i in sim.parts() do if sim.partProperty(i, "type") ~= elem.DEFAULT_PT_SPNG then sim.partKill(i) end end. If you have the script manager installed though, you can use my script which condenses that to tpt.all():neq("type", "spng"):kill().