How do you rotate and move a welded part?

So trying to make a welded part move and have its orientation be the same as the destination part. But I’m having issues for it to have the same orientation and position correct

Example

Code and Video:


I tried looking up at other threads about this but doesn’t seem the help me out.