Welded parts becoming unanchored

Hello, I’m having trouble with my welded parts. My script allows the player to cut a part (tree branch) in two and it rebuilds the welds in each part in the branch so that it can properly be split.

My issue is that after cutting the branches a second time, it rebuilds the welds correctly but appears to be unanchored after.

After branch is cut off tree:
image

Explorer view:
image

After cutting it again:
image

Explorer view:
image

This is the section of the script that is doing the welding & unanchoring:

(The welds are supposed to connect to restOfTree[1], as that’s the upper half of the original part that was cut)

Any idea of why this would be occuring would be appreciated, thank you for your time.

1 Like

Can you show more of the script? I feel like there might be some random logic error somewhere above this.

As far as I can see in the script, it looks like it will only unanchor the parts, never actually anchoring anything. (Which, of course, would always make everything unanchored).

3 Likes

Lol there was logic error, I was welding the tree parts to an unanchored part. So now I’m making sure that part becomes anchored before welding anything, thank you for the help!

1 Like