Creating an automatic moving train

I’m creating a system that will automatically have a train move from point a to point b to allow players to get to destinations. If you’ve played RDR2 you might know what I mean. (Mine won’t be controllable by the player) I’ve never done something like this in terms of coding before so if anyone can assist me with what I should use for the best performance and movement that’d be great. (TweenService, Pathfinding)

9 Likes

Note: I’m not asking for any code, just a link to what I should use to move the train. I’m happy to learn and improve.

3 Likes

You can use BodyMovers (BodyPosition, BodyVelocity) too. You can use any of these methods you prefer

2 Likes

Like you said, I would recommend tweening especially since it is simple and smooth to look at. If you wanted to move the entire train with parts, then you could weld all the parts to one base part and tween the base part’s CFrame.
Check this out: https://developer.roblox.com/api-reference/class/TweenService

6 Likes

Thank you both. I’ll see what I can do. As for BodyMovers, I’ve never really known how to use them in a script. I’ve always been confused when I looked at them. I’ll take a look on the wiki. Thank you again

4 Likes

What about turning though? Like how can you do that smoothly/well.

3 Likes

I’m also wondering about this. Would help a lot!

1 Like

I love how the solution its from Evade Game. wow

1 Like