So, I’m trying to make a very basic train, 4 wheels, a base and a vehicle seat. However, every single tutorial I have found about this specific topic either doesn’t work or is severely outdated, (dating back to 2015). Roblox Studio has changed alot, including the hinges that people use in those tutorials.
What I want:
A simple train that can only move forwards and backwards using a vehicle sea
The track:
If you do want it to go around corners then try this one: Train Experiment.rbxl (39.8 KB) (just change the VectorForce in the red Carriage Parts to get it to move forward and backward.
Strange.
How are you setting up the HingeConstraint so it “gets stuck and goes the other direction”?
Do you mean the hinged wheels start rotating the opposite direction, or the train gets to one end, stops, and then returns?
Make sure the Hinges set to ‘Motor’ on wheels are rotating correctly since if they are on the opposite side of the train (left and rignt) then the ones on one side will need a + RotationalVelocity and the ones on the opposite side will need a - RotationalVelocity.
The train experiment place I included has each of the 2 rail cars on 4 wheels, with the HingeConstaints set to None, and the moving force is from the VectorForce X or Z Force (I can’t remember at the moment). I’ve had that model up to crazy speeds and as you can see the track segment are angled at 10 or 15 degrees so it is definitely not a straight track. When the Force is set way up around 40,000 it starts to jump the track after a while.
Yeah that was the issue, I fixed it now. Also, there’s another issue. Turns, it is terrible at turning. I’ve tried making the track larger on one side, and then it works however when the track needs to become smaller again it derails. I have no idea how to make it properly turn.
Make sure your tracks are the same distance apart at all times and that the turns are smooth. Did you have a good look at the sample place I gave you? The rails there are only 1 stud wide, but I have a lot of support around them with the car wheels, centering wheel, and sliders underneath the rails to keep them from coming off the tracks. Like I said, it’ll go crazy fast before it falls off. The centering wheels are also at the same location as the wheel axles above them so the wheels are always sitting centered on each rail.
If you have to make the rails look narrower then you can put a BlockMesh in each one and decrease the scale of the BlockMesh to make them appear narrower.
Another issue is the Density of the train Parts you are using. The more dense they are the more inertia each car has and that inertia can cause the train to push off the track. Make most of your car parts have the Massless Property turned on (true). Keep the Parts that are contacting (in my model, the wheels, centering wheels, sliders and Seats) at standard Density properties. If I was going to add anything else to each car I’d make those Massless true.
Ummm, the gliders in my example work perfectly until you reach insane speeds and as @BuiIdTheBuilder said they aren’t visible if you make them Transparent.
Nobody can help you if you don’t at least try their suggestions.