I’m working on a train script and trying to make a system to stop de-railing
What is the issue?
I’m struggling to find a good method to prevent de-railing
What solutions have you tried so far?
I’ve tried to script collision groups and making invisible walls using collision groups but it gets very glitchy when they’re very close together.
I’m using BodyVelocity to move the train, just looking for a method to keep the train on the track at all times. (Train moves on its own so de-railing is a key no no for me)
What you could try doing is above the rails, have invisible “guider” parts. They basically touch the top of the train to make sure it stays within the boundaries of the rails but don’t completely cover the sides. They could be a part on each side of the train hitting the sides at the top.
Have you tried placing an invisible collide-able part (or parts) underneath the train? Basically they will be under the train and between the tracks and will collide with the tracks to prevent the train from de-railing.