Cart that goes on a train track

Would the body be the floor or the primary part?

1 Like

Using TweenService for this is pretty foolish anyways, and TweenService ignores physics constraints to reach its goal. This is not the same as ignoring CanCollide restrictions, which is what I assume OP means when they donā€™t want users to get angry with carts and players colliding with other carts.

3 Likes

The floor, as its what the axles are connected to.

1 Like

And I would use attachments to connect the hinges?

1 Like

Sorry if I misunderstood him then.

@SyntaxChase Do you want it like how he said it?

Something like this (the cart system) ?

2 Likes

Thereā€™s no other way to work with hinges, so yes. Hereā€™s a video tutorial if youā€™re stuck:
How to Build a Simple Car : Roblox Studio - YouTube.
Instead of just 1 axle-body hinge connection at the front, you want one at the front and back. You also want to disable steering.

Yeah that would be best I assume, sorry for the misleading informationā€¦

All good, I kind of phrased it weirdly. Iā€™ll let Nexus help you since he seems more proficient with vehicles.

1 Like

The cart ended up not moving, Iā€™m not sure if I did something wrong or not.

  • are any of the parts anchored? they should all be unanchored
  • delete any welds between the track and the cart.
  • the torque values must be very high

Try taking it off the rails and just driving it - does it still move?
Also, it may be worth considering moving this over to #help-and-feedback:building-support since itā€™s no longer scripting related (though if you do have any scripting problems with this, feel free to create another topic).

No parts are anchored, no welds to the track and the torque values are high. When I click W the throttle doesnā€™t go up on the vehicle seat.

I would personally use a node based approach, with tween service. You can find a few tutorials on YouTube if you arenā€™t experienced with using nodes, youā€™ll have a part, in the part I would do it with 2 values, 1 being the node your going too, and one which is going to the next node. You will need to make an array off all nodes and go throughout each, it should give you a smooth ride if done correctly.

Like I said before, I would advise against TweenService simply because it works poorly alongside physics. Furthermore, with turns and curves, it can be quite difficult to get TS to turn the cart perfectly along the normal of the curve. Controlling the cart can also be quite difficult using TS.

There definitely would be performance implications, with the fact about how movement would be hard with the driving you can make it slow/speed up with using the node based system, and for the rotation of the cart, that would probably be the hardest part but I suppose it really depends how vital the cart will be for the game, if the amount of time it would take to make this system is justified. I would recommend psychics based if itā€™s not a massive gameplay feature, but if you canā€™t risk a derailment then node based would be more ideal.

How would I go about doing this?

I also would love to know how youd do something like that, except mine is for a minecartā€¦ like yours @SyntaxChase

I used a LinearVelocity inside my cart to add downforce and the speed to go forward.

1 Like

You might want to see what I said above ^^^

I thought the whole fun of cart games was in order to control your speed so as to not fall off. Removing derailing kind of ruins the fun of it.
@SyntaxChase , vehicles are tedious and require a lot of trial and error to get exactly what you need, but they are realistically the best way to go about cart games if you want to allow the normal things cart games have.

Would you add speed by using a vehicle seat?