Modify MeshPart.MeshId through plugins/command bar

As a developer, it’s currently painful to have to manually change MeshId for a large number of MeshParts at once. As an example, I have spent a bit over 3 hours changing 100 Special Meshes to MeshParts manually today, while I could have used that time to do other things for the game.

I understand that changing it at runtime has complications, however it’d be great if we are allowed to change them via plugins. If Roblox is able to address this issue, it would save us the time we need to spend manually setting our meshids and spend more time making other things for our games.


Any news on this as its continuing to be a huge road block in development.

1 Like

Sorry to bump though now that realtime CSG is out is it any easier to get something like this to happen?

So, I’m trying to figure out what you need exactly? You want to change:

This for a bunch of meshes all at once, right?

I’m just uncertain under what use case you’d need to change them via Plugin/Command Bar rather than just changing them by selecting all the Special Meshes in studio, and changing them by putting the code in. Idk, maybe I’m misunderstanding what you’re trying to do.

This is for MeshParts – not SpecialMeshes. Command bar is needed because manually changing them takes too long. Using command bar to select and properties window to change may not be acceptable in the case that MeshId is calculated instead of all being set to the same.

Ah, yea.
Couldn’t you name all the MeshParts like “Lamp” and run a while loop script that finds all the things called “Lamp” and changes their MeshID? I mean, you’d have to run the game, and then when you stop, it’d revert the changes, but you could grab all the meshes during play, and copy/paste them into edit mode.

The issue here is that MeshPart.MeshId is tagged as NotAccessibleSecurity for ScriptWriteRestricted.

This means that any sort of script, be it a Script, LocalScript, CoreScript, Command Bar, etc. trying to edit the MeshId of the MeshPart will result in an error being thrown, and the property thus can’t be changed.

The purpose of this thread is to be able to efficiently change that property for a bunch of MeshParts that might be too tedious to do manually, as EchoReaper mentioned. This is currently not possible to do with any sort of script.


You can somewhat work around this restriction by cloning the replacement meshpart from somewhere, and copying all the properties of the part you’re replacing.

However, this wouldn’t work for OP’s case as the meshpart instances don’t exist yet and are very varied. It’s disgusting to need to work around this in the first place. I ran into this issue recently and it was an utter waste of time to fight with.

Also, to comment on the current issue with MeshPart.MeshId not being accessible for write, a current workaround could be to save the place / model as a .rbxlx or .rbxmx file (XML representation of the place / model), then via some external program scan traverse through the XML structure and identify the tags of
<Item class="MeshPart" referent="..."> containing the following two tags:

<Content name="MeshID"><url>rbxassetid://1234567890</url></Content>
<Content name="MeshId"><url>rbxassetid://1234567890</url></Content>

Which can then be replaced externally.

Of course though, this is a workaround and requires knowledge of traversing the XML structure and such, which could be easier to do with the ability to change the MeshId from Roblox :slightly_smiling_face:

1 Like

Ran into this problem twice recently. First time was trying to change the CollisionFidelity, which is also locked, on a few hundred trees that had accidentally been left on Default instead of box, and then having to wrestle with studio crashing a ton trying to change it all instead of it taking literally 30 seconds with a command bar script, then again trying to transfer a bunch of SpecialMeshs into MeshParts for efficiency testing, which again, should have taken mere seconds with a script but instead took 40 minutes.


I am running into this issue right now and it is bothering me. I want to convert special meshes into mesh parts but I cannot set the property even through the command bar.


This is an annoying restriction. I am trying to replace the MeshId for a bunch of meshparts in my game after I updated the meshes and I have to manually do it for every part because of this


Why is this still a restriction? This makes developing rojo-managed applications a pain for everyone involved. Since MeshIds are un-writable, it’s impossible to sync them directly into studio, so we’re forced to build a separate place file and transfer the assets across every time instead.

Not to mention the countless inefficiencies everyone mentions below.

Please fix this. There’s no obvious reason to have it restricted to an elevated permission. It’s simply inhibiting our ability to develop.