How do I prevent derailments of trains?

I have a game that uses mover constraints for trains, and these trains are kept on track by having cancollide parts in between the rails. Additionally, I’ve added invisible parts above the rails to stop these parts from “jumping” out of the rails. However, in my game I keep getting derailments for my trains, as seen here:


I’ve tried manually riding the trains in game and in studio test mode, to see where they derail, and manually checking the tracks for any gaps where the cancollide parts are able to jump out of the rail. However there always seem to be derailments happening every day despite my efforts to cut down on derailments. Has anyone been able to find a way of solving the derailment issue, or is this a bug with Roblox?

I would suggest using counterweights. Heavier trains are much easier to knock over. If you place the weights underneath the train, then they’ll be biased towards remaining upright. You also need to make sure that the guide parts have enough breathing room. Make the rails or at least their collides tall/deep to allow for movement in the Y axis without them jumping out of the rails. In the picture that you’ve shared, the rails appear extremely thin and close to ground level. I’d hope that the guides have more room than that. Maybe use collision groups to prevent the guides from colliding with the terrain and restrict the guides to only colliding with the rail and hitboxes. Also, what variety of trains do you use? Are they bodymover/force trains or simulated-wheel trains?