Transforming MeshPart into SpecialMesh?

Because of the limit on how small parts can be now, I have an issue with some meshes that need to be super small. I’ve heard a good work-around is to use a SpecialMesh instead, but I haven’t seen anyone show how to do that. How would I take my MeshPart and turn it into a SpecialMesh?

2 Likes

Go into studio. Find a special mesh in the roblox model library. In studio put that special mesh next your meshpart. Copy the meshID from the meshpart and paste it into the mesh ID of the special mesh. Scale it to the size you want.

5 Likes

Sounds way easier than I expected! I’ll mark that as the answer once I try it later today.

1 Like

I just tried this and it actually worked, I would have never though it would be so simple… everything I know is a lie

1 Like

Wow yeah, you can literally just copy the MeshId from the MeshPart and paste it into the MeshId for the SpecialMesh.

I made a thing using a special mesh and theres one more step that I want to add

Before you switch the IDs…copy the position of the meshpart and paste it into the special mesh, and then copy over the meshpart ID.

Thats if you want to make a section of your mesh into a special mesh.

Yup I ended up just writing a small script that would convert the currently-selected meshpart into a new part with a specialmesh

Could you possibly make that a plugin?

Yeah, it would be easy to do that. Here’s the code I wrote quickly to do it. It’s nothing fancy:

-- MeshPart to SpecialMesh:

local copyProperties = {
	"Name", "Anchored", "Locked", "CanCollide", "Transparency", "Color", "Material",
	"Reflectance", "CFrame", "BackSurface", "BottomSurface", "FrontSurface", "LeftSurface",
	"RightSurface", "TopSurface"
}

local meshPart = game.Selection:Get()[1]
assert(meshPart:IsA("MeshPart"), "Seleciton must be a MeshPart")

local part = Instance.new("Part")
part.Size = Vector3.new(1, 1, 1)
for _,p in pairs(copyProperties) do
	part[p] = meshPart[p]
end

local specialMesh = Instance.new("SpecialMesh")
specialMesh.MeshType = Enum.MeshType.FileMesh
specialMesh.MeshId = meshPart.MeshId
specialMesh.Parent = part

part.Parent = meshPart.Parent

The annoying part is that it can’t really set the size properly. So it’s best to just use this code on MeshParts that have been inserted but not resized yet.

7 Likes