How To Make A Train?

Hey all! I am currently making a new game, and was going to have a train implemented. However, the problem with that is that I’ve never worked with trains or even attempted to try and simulate what a train does. Does anyone know how to do something like this? It would be greatly appreciated. Thanks.

There are 2 main methods I can think of.

One is to script a system in where you can create “tracks” with a script. You should be easily be able to get the point of the track that is in front of your train and move the train along that track. Look into bezier curves as not only are they smooth but it will enable you to create curves and straight lines by hand easily

It’s a lot of work however you can get very smooth movement system. You can also get the train to move much faster than the second method.

The second way is to use constraints. You could use prismatic constraints if your train is going along a straight line. If not then you can shape your constraints similar to a roller coaster in order to not make it fall off.

Roller coaster wheels for reference: image

It is a lot harder to build the track, plus since it relies on Roblox physics system it is unreliable(can be exploited, can’t go fast) but it is much more simpler and intuitive to do.


A game that manages to pull off this sorta type of train system you described is Pinewood Computer Core
heres a screenshot of the wheels?