How do I make a cart not derail

I wanted to make a simple cart ride, just like the one made by Rdite (Cart ride into Rdite!) but I cannot get the cart to work properly, it just keeps derailing on turns or when going up. I tried with low and high speeds but i get the same result every time. I tried using different body movers - the deprecated ones and the new ones, different ways to set velocity via scripts or by simply looking at the dev forum for simillar instances. The cart model I’m using now moves with hinge constraints inside each of the wheels, I want to make this cart not only work but also be as stable as it can get without using any additional parts.


cart2

2 Likes

There are a ton of previous posts about “cart derailing” “cart shaking” “train derails” etc.
I’ve posted on many of them with tutorial models.
Try the Search tool at the top of the page with the terms I mentioned above.

It looks like you don’t have wheels under the rails which is likely why it derails. Look through the other posts since there are many variables that you need to consider as well, and repeating them again in this post is just repeating the same information.

I’ve tried searching for such posts as you said, and I did come across some that somewhat helped. I added gliders underneath the rails but I’m not sure if it completely solves the issue, as when the cart does derail at very high speeds (which is intended) it sometimes got stuck on the gliders because they use collision groups so they only collide with the rails/track. But it did definitely help.

As stated in the other posts, I think your gliders are too small. Small Parts have issues in Roblox physics. They’ll clip through other Parts.
Instead of 2 small cylinders (the white ones in your picture use a large single cylinder between the rails, almost touching both sides so it won’t stick going around corners. Make it thicker than the rails. Also move them as far to the ends of the cars as possible for the most support.
Also make sure your rails have absolutely no edges sticking out where the Parts meet up at the ends.
One of the first train examples I built would handle 5 or 10 degree angles of bends between rail sections, but it definitely limited how fast the train would go before derailing. Smoother curves are your friend.

Sorry for a late response, I added a single large cylinder as you said however the cart derails now much easier as it doesn’t have front supports anymore, did I do something wrong?
cart3

it’ll pivot around the single cylinder.
You need one at either end to keep it aligned to the tracks.

I tried with 1 cylinder on either the front, or the back and yet it still derails, when I tried making the cylinder bigger, the cart got stuck on sharp turns the closest I got it to work is by adding 2 cylinders like so
cart

Quick update: by making the cylinders thicker and alligning them properly i managed to get the cart not to derail at decentely high speeds! It was most likely the solution but I’ll do some tests to confirm if it works.
cart1

I tested every cart type (1, 2, 4 seats) and they work as intended, the only thing I noticed was that they sort of “shake”, they pivot correctly but because the front cylinders are gone they don’t allign perfectly, which results in them slightly turning from left to right. Still works though.

That’s what I meant by one at either end.

Try moving the centerline of the red cylinders to the very ends of the carts. That will give more support to keep it from twisting side to side.

Here’s one of the tutorial places I mentioned in my other posts:
Train test, bogies with tilt (VectorForce or Hinges).rbxl (191.8 KB)

Even after moving the cylinders they still twist a bit, and I noticed the cart isn’t as fast as it was before. I tried changing the size of the cylinders, by making them bigger so the twisting was less noticable but at the same time the cart could hardly go through corners, and if I made them smaller then the cart would derail.

Like I said, make the cylinders almost touching the rails.
Corners will have a small area where they are closer together.

For example look at the sizes of the cylinders between the rails in my tutorial place. I think the rails were 6 studs from the inside edges and I made the cylinders something like 5.99 studs in diameter.
Experiment a little bit to see what size works best for you. You can test the game, drive the cart, and manually change the size of the cylinders while testing to get the best performance. Just remember to change it to that size when you’re back in Edit mode.

I believe this is the closest I got it to the original, the cart still twists a bit but it’s honestly not very noticable, thanks for your help I have no idea how would I make this cart work without your help.
cart1