So say I have a sphere and a part on the surface of the sphere. I want to make it so the part points in a way where the top of it (the UpVector?) points away from the center in a way where it’s kind of standing on the sphere like the sphere was Earth.

A 2D representation of my problem

I’d greatly appreciate help since I am not good at CFrames and it’s demotivating to get stuck on these kind of problems!

The up vector is easy - `(part.Position - center).Unit`

But you need at least two vectors so you can define the rotation more completely.

Luckily, one of those vectors can be kind of “approximate”.

For instance, you can use the pre-transformation LookVector of your part to get the other vectors you need to build a matrix.

Something like:

```
-- assuming 'center', 'part', and 'radius' are all defined
local up = (part.Position - center).Unit
local position = center + up * (radius + part.Size.Y/2) -- position on planet surface
local back = -part.LookVector
local right = up:Cross(back)
part.CFrame = CFrame.fromMatrix(position, right, up)
```

Woah, this actually worked! I would have never thought of the :Cross thing. Thanks!