Part follow nodes at a constant rate

Currently I am working on a system that moves a train between nodes. I want it to move at a constant rate, basically the short turns go the same speed as the long terns. I don’t know how to move the part between nodes.

If I shouldn’t use nodes and instead something else let me know the best way. If your wondering why I say part its because I move the part and then more the model’s primary part CFrame to the part. Once again if there is a better way to move a model (at a constant rate) let me know.

1 Like

Try using Roblox’s TweenService linear easing style.

Same answer.

I made a rail grinding system that runs off of nodes:

You could fashion it for your train model fairly easily, and maybe run it once for each car.

I think you are misunderstanding. I am using linear tweening however if I want the part to move 10 studs and then 5 studs I want it to move both those distances at the same rate instead of the 10 stud one moving twice as fast. That’s why I would like to use nodes but I am unsure of how.

I would do it by gathering the distance between each node and adding it up to give you the total distance, solving for the time you want it to take, and then dividing that time into the amount of segments you have, so that you have an even amount of time for each node.

Thank you I am going to try this.

One thing I am unsure about is how do I rotate the model along the nodes? That’s why it seems better to use parts that way it can rotate along them.

Making a train rotate along the tracks like that is going to be more difficult but what you can do is add nodes along the edges of a track and then rotate by CFrame to the next node using a tween. It’s janky but it should work.

1 Like