-
What do you want to achieve? A smooth train system like Terminal Railways
-
What is the issue? My trains cant go around turns and sometimes just glitch off the rails
-
What solutions have you tried so far? Just 4 parts under the train welded with a body thrust
How is your train attached to the tracks? Need a detailed description of what’s going on, not just “with Parts”.
How smooth are your curves? The smoother the better, but know that more Parts = more lag.
You have to also realize Roblox physics can be pretty untrustworthy when dealing with train engines & cars since you are trying to keep each one on the rails as well as attached to each other.
Are the 4 parts welded to each car, or individual cars? Each car should only need one with thrust in it.
Ok so I am using
with a body thrust. I am having trouble with trying to get just a simple one car train to workHave you thought about making the train move by tweening its CFrame. You could use pathfinding and make the character seem wide and unable to jump, this would keep it near the centre of the tracks.
Then you will have to figure out how many points behind each trailer would be from the one in front and move them all.
so if trailer 1 is moving towards point 20, trailer 2 might be 5 points behind so going for point 15
Most ‘rail’ type systems I’ve seen use wheels on top of the rails, inside the rails, and under the rails to keep the train on the track. This can still glitch and cause trains to jump the tracks though.
I think the smoothest, most reliable setup would be to go with CFramed cars and tween them as @minimic2002 said.
Well if you ever recall playing those ‘ride a cart to win’ games you will know how much they fall off, and that just a cart. A train would be more likely to come off.
^ Change a few bits and it should be good to stick on there. You will have to make it think the character is big. So just follow what it says and it will be easy enough.
So you will want to make char radius wide, the height id make small so it doesnt try walking over the sides of the rail. CanJump should be a false. As for the start and end position set them where you want it to start and where you want it to go. Keep in mind it will try to take the fastest route
You can either take the waypoints and make invisible parts where they are or you could generate the path each time.
Thanks for all the help guys