Set the MeshId to a part that supports materials

I would need to set the MeshId of a MeshPart via scirpt for a plugin, so that I can set a material. however it is not possible as MeshId (of a MeshPart) is not accessible from scripts. any idea how I can get a scriptable MeshId on a part that supports materials?

I state that it is not possible for me to copy parts with MeshId already set manually from a storage because the plugin will interact with the accessories of the avatars (all the accessories in the catalog).

Error obtained trying to apply the meshid to a meshpart:
Unable to assign property MeshId. Script write access is restricted