My game requires welds between parts for my maps for destruction. My problem stems from trees:
Each tree has exactly 1 leaf and 1 log. There are 2 welds inside the log that weld the log to the leaves and the log to the anchored baseplate
The entire map is anchored within ServerStorage. It then gets loaded into workspace and unanchored with this method:
for i, v in map:GetChildren() do
local newV = v:Clone()
newV.Parent = game.Workspace.Map.Destructable
if newV:IsA("Model") then
newV:MakeJoints()
end
end
-- Unanchor all the parts with welds
But this method has a problem:
The trees lose their welds for some reason:
Specifically, they lose their welds to the anchored baseplate and I have no clue why this happens or how to fix it.
The only thing that has seemed to IMPROVE the problem was to avoid changing the collision group of the parts during the games runtime. This still isnt a definite fix though
Why so many welds?
You only need one WeldConstraint between the log and the leaves, and one WeldConstraint from the weld to the baseplate.
They donāt need to be Anchored in the ServerStorage if they donāt need to be in the game.
The other thing is if you are calling ModelMakeJoints does that affect the WeldConstraints? The issue I see is if you use MakeJoints and the surfaces are smooth (not SmoothPlastic, but Smooth, not a Weld, Glue, Stud, Inlet or any of the old deprecated joints) then then " * Smooth surfaces will not create joints" according to the linked info. It also only makes joints on items that are planar to each other (flat against each otherās surface), but your trees arenāt like that.
Check your WeldConstraints to make sure the Part0 and Part1 properties are set in Studio.
Iād highly recommend having one anchored āmasterā part (best choice here would be the trunk) and welding that to all the other unanchored āsubordinateā parts (best choice here are the leaves.) Set the CFrame of the tree trunk, not the position. Centax and I commonly used this to handle tower models in PSTD.