Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Can somebody explain/show how to rotate a model with CFrames using the PrimaryPart?thing?

Asked by 5 years ago

I know how to use the CFrame. My problem is how do I rotate the model using the PrimaryPart? I've looked at other examples and the wiki but I just can't seem to understand it quite all the way.

0
PrimaryPart just references a model's property (which the value of is a part). Treat it as any other part when rotating. So Model.PrimaryPart.CFrame = Model.PrimaryPart.CFrame * CFrame.Angles(0, math.pi, 0) which would rotate the yaw of that part 180 degrees pidgey 548 — 5y
0
If you want to rotate the entire model you can use :SetPrimaryPartCFrame(theCF) and this will rotate the entire part around the center part's rotation Wafflecow321 457 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

SetPrimaryPartCFrame(thething'sModel:GetPrimaryPartCFrame()*CFrame.Angles(0,0,0))

Ad

Answer this question