I’m trying to develop a solution for rojo’s lack of MeshPart live-syncing. Utilizing AssetService:CreateMeshPartAsync
appeared to be the right call, and for static meshes it works perfectly!
But right now there’s a problem with skinned meshes. If you try to create a mesh that has skinning data, the HasSkinnedMesh
property is always set to false. This is a problem because scripts are not able to modify this property.
Reproducing
SimpleRepro.rbxl (97.0 KB)
In this repro, I have two models that are direct copies of each other, except the one on the right has its MeshId emptied out. Start the place in run-mode, then paste the following code snippet into Roblox Studio’s command bar:
-- Load a new copy of the mesh from the avatar on the left (pretend we don't have this mesh loaded already)
local importedMesh = game.AssetService:CreateMeshPartAsync(workspace.S1.Lola_Geo.MeshId)
importedMesh.TextureID = workspace.S1.Lola_Geo.TextureID
-- Apply it to the avatar on the right:
workspace.S1_Unloaded.Lola_Geo:ApplyMesh(importedMesh)
If done correctly, you should be observing the following:
The rig on the right is stuck because the MeshPart applied to it was not flagged as a skinned mesh. Now imagine someone is trying to reconstruct a skinned MeshPart rig entirely in Luau from scratch. It’s basically impossible at the moment, which is incredibly frustrating.
Expected behavior
CreateMeshPartAsync
should correctly mark imported MeshParts as skinned if they can be deformed by bones, and all will be wonderful and swell.
I just want to be able to live sync MeshParts from my file system and store them in GitHub without any friction or problems. This has been an issue for YEARS now and it’s ridiculous