I don’t really know where to put this, so I’ll try here.
Hello! I’m trying to make some form of train for fun, don’t know much about cframe and tweening so I went with physics, when I go around corners the train bogies go wild and glitch off the track.
How can I fix this, or is there a way to use tweening/cframe without sacrificing player control?
This is ussually a case from
a. going too fast
b. the rails are too tight
Id recomend putting a bv in a base part of the train, that grey part on the bottom is a good spot, put a script into the seat and add a script that as the player holds w it will increase a value inside the train slowly, and when the palyer holds s it will decrease the value. You can have another script that has a function change to change the bv whenever the value changes.
This will allow for smooth driving if done right.
After this, on the trucks remove wheels, or make them welded as decoration, put a cylinder on the top of the rails, a ball inbetween the rails with its side almost touching, or take another cylinder and put it on its side between them, underneath of the trail put a flat part that goes from about the middle of the truck to the front of the truck. This allows for slopes if you want it
Now collisions, create two new groups, rails and gliders, take those parts that keep them on the track and name them gliders, when that is done open up the collision group editor and add the groups mentioned.
Rails collide with gliders, and default
Gliders collide with rails, and themselves only.
Yup, it doesn’t glitch out anymore! Only problem is the weight stops it going round corners, I would try making the carriages weightless but I think that’ll make them way to bouncy and derail.
I would put a part under the ground to stop it jumping but I have no clue how to do that.