Is there a way to make my train turn freely

I am trying to make an automatic train that moves along tracks and so far I have made it so it can move in one path but I am stuck on making it actually turn freely. Right now I’m CFraming the train to make it move forward and using “fromEulerAnglesXYZ” to turn it but that doesn’t allow it to turn freely. Is there a way to make the train turn freely with Cframe and if not with CFrame, what should I use in order to do that?

Script:

workspace["DC Metro11"].PrimaryPart = script.Parent.Engine

while true do
	for i = 1,100 do
		
		wait()
		workspace["DC Metro11"]:SetPrimaryPartCFrame(CFrame.new(workspace["DC Metro11"].PrimaryPart.Position + Vector3.new(0,0,-1)) * CFrame.fromEulerAnglesXYZ(0, math.rad(10),0))
	end
end

Try searching ‘train move with cframe’ or ‘train cframe movement’. There have been posts in the past that have solved this question.

You can use CFrame.Rotation aswell, try looking for other threads.