Answered by
7 years ago Edited 7 years ago
If you need to unanchor all parts within the model, you can paste this script into the command bar:
2 | local model = workspace:FindFirstChild(modelName, true ) |
3 | for _,part in pairs (model:GetDescendants()) do |
4 | if part:IsA( "BasePart" ) then |
If you want to keep the parts inside the model connected together, however, you would need to use a weld script, which may look something like this (continuing from the last script):
01 | local centre = model.PrimaryPart |
02 | for _,part in pairs (model:GetDescendants()) do |
03 | if part:IsA( "BasePart" ) and part ~ = model.PrimaryPart then |
04 | local weld = Instance.new( "Weld" ) |
05 | weld.Part 0 = model.PrimaryPart |
07 | weld.C 1 = part.CFrame:toObjectSpace(model.PrimaryPart.CFrame) |
08 | weld.Parent = model.PrimaryPart |