Alright, thank you all! I figured out how to do this. Now, I know some people might be looking to do a similar thing so I’ll explain how I did it. I didn’t make a train but you could easily do so. Keep in mind that this may not be the best method but it is one that works for me.
First off you will want to connect all of your parts to one ‘Root’ part, as :SetPrimaryPartCFrame() slowly dislocates parts. After this, you can use TweenService to move the Root smoothly, which will also move any parts connected to it.
I created several parts to act as nodes and then looped through them. I tweened the model to each part.
To maintain the same speed at any tween distance, you can use Time = Distance / Speed. In my case, I did the following:
local Speed = 16
function GetTime(Distance, Speed)
-- Time = Distance / Speed
local Time = Distance / Speed
local NewPoint = Points:WaitForChild(""..i) -- New selected point/node
local Distance = (Raft.PrimaryPart.Position - NewPoint.Position).magnitude -- Get the distance between the current position and the next node
local Time = GetTime(Distance, Speed) -- Calculate the time
local NewTweenInfoTable = TweenInfo.new(
Time, -- Time
0, -- RepeatCount (-1 = Infinite)
false, -- Reverse tween after finishing
0 -- DelayTime
-- Then you would make the Tween with the TweenInfo
To keep the player on the moving object, see this thread: Jailbreak train platform system?