How to make a basic train

No you just have to stick it with weld, I don’t know why they are falling, make sure you kept it correctly

Okay, I will try that. if it does work. then that will help a lot

Firstly, you’re mistaking Velocity with Force.

Secondly, you’re setting AssemblyLinearVelocity directly, which is a bad practice to begin with.
(you should use LinearVelocityConstraint instead)

You’re also using a while wait() loop with it, which does not guarantee that the velocity will be updated every physics frame (which it should, and with this solution it probably won’t).
(This is also why it isn’t moving when you set 5 studs velocity as the speed will be lost in friction before the script will update it again)

Thirdly, you’re using Wedges, which have a more complex collision model than Parts. Why not just use a Part that is rotated 45 degrees?

1 Like

This is a very good tutorial. Thanks, @Deadwoodx!

1 Like

I figured it out by pressing a random button, now if I have a locomotive, followed by a couple of cars, could I add another locomotive to help the first one?

If you’d used my setup or Deadwoodx’s you can just add thrust to each car to help move it.
More locomotives = more parts and more places for it to break.

I made bogies on the train and i put hingeconstraints to attach them but now the train shakes.

How can I fix it ?

1 Like

Use tween service instead

Try this method of roller coaster system to avoid lag and shakes:

2 Likes

Okay but the problem with your tutorial is the train can’t be drivable.

It actually can be drivable, but you need to do some controls for it

Where are you applying the velocity?

1 Like

Hello :smiley: Can you turn this into a free model so I can sample this.

1 Like

@Deadwoodx i want to make an automatic train but also want it to make it stop at station can you please help me

1 Like

Sure, add me on discord Deadwoodx#0056, tell me your id so I can add you

Sorry I don’t encourage others to just use my tutorials, I like to spread knowledge, as it will increase but never decrease

4 Likes

How do I weld it?

Also if you could explain my how to do stations, wagons and a good looking transport train it would be really nice, thanks. Either discord or dev forum DM is good for me.
My discord: 𝐖𝐨𝐫𝐤𝐬𝐩𝐚𝐜𝐞#1555

I think to make wagons or train cars you’d have to make it the same way just without the script and welded to a connector which is welded to the main train.
For welding, if you absolutely don’t know how I’ll show you.

1 Like

The wedges and back part fall off…

1 Like

Step 1. Make the wagon’s base.
Step 2. Design the wagon around the base, welding each part so they don’t come undone.
Step 3. Weld a connector part (one that you made) to the base of the main train.
If you need more help let me know

Issue: I don’t know how I should weld it

Add a weld instance to any part in the train model

Select the 2 properties of the weld, to the two parts which should be welded

Done