I’m trying to make a script that converts all accessories in a rig into meshparts for a system I’m making. However; I can’t seem to get the scale just right. It is either too small or too big
local AssetService = game:GetService("AssetService")
local character = workspace:FindFirstChild("TargetRig")
local rig = character:Clone()
rig:PivotTo(rig:GetPivot() + Vector3.new(5,0,0))
rig.Parent = workspace
local body = rig:GetChildren()
for _, feature in body do
if feature:IsA("Accessory") then
local handle = feature:FindFirstChild('Handle')
local specialmesh = handle:FindFirstChild('Mesh')
local meshpart = AssetService:CreateMeshPartAsync(specialmesh.MeshId, {
CollisionFidelity = Enum.CollisionFidelity.PreciseConvexDecomposition
})
meshpart.TextureID = specialmesh.TextureId
meshpart.CFrame = handle.CFrame
meshpart.Size = handle.Size
meshpart.Anchored = true
rig.HumanoidRootPart.Anchored = true
meshpart.Parent = rig
feature:Destroy()
end
end
Any help would be appericated