Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I rotate a model towards a CFrame?

I don't need any links to the wiki about CFrames. I have a model and I need to rotate it towards a CFrame. How would I do that?

CFrames are very confusing to me. I understand the concept of them, and that they make up the rotation matrix or whatnot.

1 answer

✓ Accepted answer

The easiest way to do this is to give the model a primary part (preferably one right at the center) and use Model.SetPrimaryPartCFrame method. This will move/rotate all the parts in the model with it. Example:

PointToFaceTowards = Vector3.new(100, 200, 300)
Model:SetPrimaryPartCFrame(CFrame.new(Model.PrimaryPart.Position, PointToFaceTowards))

1 comment

0

This should help, thanks.

This discussion is preserved as it was. New answers, comments, and votes are closed.