How to scale special meshes with part size?

I am trying to make a plugin to easily bevel parts. The only issue is that when inserting a special mesh with the following meshId:

rbxasset://avatar\\meshes\\torso.mesh

It is shaped like a torso, and setting its scale to 1,1,1 doesn’t stretch it to be the full size of the part, if that makes sense. I found a solution by using MeshParts. The only problem is that I don’t think plugins can create mesh parts and change their mesh Id. I’m stumped.

So, how I can make a special mesh stretch to the full size of a part, like a mesh part?

EDIT: I’m going to include some photos of what I want, without having to use meshparts:
image
See how it “stretches” the mesh to the full size of the part? I want this to occur no matter the size of the part.

1 Like

From what I did using the MeshId you gave, It seems like the Scale property of the SpecialMesh must have its X and Y be half the size of the part’s X and Y and the Z to be the same as the Z of the part

Basically

part.SpecialMesh.Scale = Vector3.new(part.Size.X / 2, part.Size.Y / 2, part.Size.Z)

Gave me something as close to the original size of the part as it could be. From there, it scales properly when resizing afterwards

3 Likes

Thanks for this! I didn’t know it would be that simple. :grin:

1 Like