Make part CFrame also include movement direction?

I’m having trouble trying to make the root part also face in the direction of movement while moving, everything i’ve tried ends up making the movement spin in circles very quickly and does not move forward in the direction the camera is facing, how can I fix this issue?

while wait() do
local direction = Vector3.new(0, 0, 0)
local lookVector = camera.CFrame.LookVector
local rightVector = camera.CFrame.rightVector
local forwardVector = rightVector:Cross(Vector3.new(0,1,0)).unit
if input.w then
	direction = direction - forwardVector * 5
end
if input.a then
	direction = direction - rightVector * 5
end
if input.s then
	direction = direction + forwardVector * 5
end
if input.d then
	direction = direction + rightVector * 5
end
part.CFrame = part.CFrame * CFrame.new(direction * 0.1)
end