For anyone with large amounts of Torso meshes in their games, here’s some code to convert them to parts+wedges:
local properties = {
"Size","CFrame","Color","Material","Anchored","Locked","CanCollide",
"Transparency","Reflectance","Archivable","CollisionGroupId",
"CustomPhysicalProperties","TopSurface","BottomSurface","LeftSurface",
"RightSurface","FrontSurface","BackSurface"
}
function copyApperance(part1, part2)
for _,property in pairs(properties) do
part2[property] = part1[property]
end
end
function convertTorsoMeshToPart(torso)
local middle = Instance.new("Part")
local wedge1,wedge2 = Instance.new("WedgePart"), Instance.new("WedgePart")
copyApperance(torso, middle)
copyApperance(torso, wedge1)
copyApperance(torso, wedge2)
local middleWidth = torso.Size.X - torso.Size.Z*0.6
middle.CFrame = torso.CFrame
middle.Size = Vector3.new(torso.Size.X - torso.Size.Z*0.6, torso.Size.Y, torso.Size.Z)
wedge1.Size = Vector3.new(torso.Size.Z,torso.Size.Y,torso.Size.Z*0.3)
wedge1.CFrame = torso.CFrame * CFrame.Angles(0,math.pi/2,0) * CFrame.new(0,0,-(middle.Size.X/2+wedge1.Size.Z/2))
wedge2.Size = Vector3.new(torso.Size.Z,torso.Size.Y,torso.Size.Z*0.3)
wedge2.CFrame = torso.CFrame * CFrame.Angles(0,-math.pi/2,0) * CFrame.new(0,0,-(middle.Size.X/2+wedge2.Size.Z/2))
middle.Parent = torso.Parent
wedge1.Parent = torso.Parent
wedge2.Parent = torso.Parent
torso:Destroy()
end
print("Starting")
for _,v in pairs(game:GetDescendants()) do
pcall(function()
if v:IsA("SpecialMesh") and v.MeshType == Enum.MeshType.Torso then
convertTorsoMeshToPart(v.Parent)
end
end)
end
print("Done")
This can be ran by opening the command bar with the Command Bar button in the View tab, pasting the code into the command bar, and pressing enter. If you have torso meshes that are welded to anything, you’ll need to modify this to re-weld them (you can get the joints for parts with part:GetJoints()) or manually re-connect them.