Is there a way to change what surface looks at a part with CFrame.lookAt?

Okay, so I managed to get an accurate form of gravitational pull by using solely the LocalScript below

local character = script.Parent.PrimaryPart
local planetoid = game.Workspace.Planetoid
local atmosphere = planetoid.Atmosphere
function gravityFunction()
	if character then
		--The thing I want goes here.
		character.CFrame = CFrame.lookAt(character.Position, planetoid.Position)
	end
	if character and not character:FindFirstChild("gravityPoint0") then
		local gravity = Instance.new("LineForce")
		local gravityPoint0 = Instance.new("Attachment")
		local gravityPoint1 = Instance.new("Attachment")
		gravity.Parent = planetoid
		gravity.Name = "gravity"
		gravity.ApplyAtCenterOfMass = true
		gravity.Magnitude = 1000
		gravity.Attachment0 = gravityPoint0
		gravity.Attachment1 = gravityPoint1
		gravityPoint0.Parent = character
		gravityPoint0.Name = "gravityPoint0"
		gravityPoint1.Parent = planetoid
		gravityPoint1.Name = "gravityPoint1"
	end
end

atmosphere.Touched:Connect(gravityFunction)

If I can just make it so that the BottomSurface faces the planetoid instead of the FrontSurface, and then tweak the camera, my gravity script will be complete. The only thing holding me back is that I don’t know how to adjust CFrame.lookAt to do so. I couldn’t find any tutorials related to what I want to adjust, so I turned to you for help. Got any ideas?

Just Answering the Title and not the script, yes you can Change what Surface looks
Example of a Part using

script.Parent.CFrame =script.Parent.CFrame * CFrame.lookAt(script.Parent.CFrame.RightVector, workspace.Baseplate.Position)

There is:

LookVector, XVector, YVector, ZVector, UpVector, and RightVector
Which I believe are the faces, could be wrong tho

1 Like

Your method gives me an error that is along the lines of ‘Vector3 expected, got CFrame’