I have two parts that are welded together. One is named PivotPart, and the other is named Flag. The flag pivots around the PivotPart, and it's told to point towards a certain orientation. So how do I make the flag point towards whatever WindDegree is by "CFraming from the weld"?
I'm terrible with CFrames, absolutely terrible. I don't understand them that well and all explanations that I can possibly find are confusing. I understand that they are positions and rotations, and the fact that they use matrices. I can't find anything to help me with this.
What I've tried:
ship = script.Parent
WindDegree = 45
ship.PivotPart.Weld.C0 = ship.PivotPart.Weld.C1 * CFrame.fromEulerAnglesYXZ(0,WindDegree,0)

2 comments
I'm not quite sure how to fix your problem - persay - however, you could try using a BodyGyro. And for future reference, you can angle a vector3 towards another vector3 via this line of code: CFrame.new(vectorFrom, vectorTo)
BodyGyro probably wouldn't work out, but thanks for the tip. Might help in the future.