How do i make a part rotate around a position?

Hey! I need a quick explanation. How do i make a part rotate around a position? Like for exemple, i planet orbiting around the sun.

Im not the greatest in these types of things, im trying to learn a bit more everyday.

Anyways, thanks!

1 Like

You start with CFrame.fromAxisAngle to create a rotation around the origin. if you multiply this by a vector you get a position on that rotating frame. So for orbiting the origin you could do like:

CFrame.fromAxisAngle(Vector3.yAxis, myAngle) * Vector3.zAxis * radius
1 Like