Cart falls off rails

Hello! I have a little problem with a chairlift-like ride I made. The cart glitches then eventually falls off. Here’s a video:

  1. What do you want to achieve? Keep it simple and clear!
    I want the cart to move smoothly and not fall out.
  2. What solutions have you thought of so far?
    I tried to make it massless, but when player sits, the ride gets flung.

I’m also going to show the script the rails contain, in case if it was the core of the problem.

while true do
script.Parent.Velocity = script.Parent.CFrame.lookVector *script.Parent.Parent.RailSpeed.Value

Any help will be appreciated!

1 Like

If your path is fixed you can try and use Tweening but i see you using something called railvalue. Im assuming its a speed modifier so You could try to set collision fidelity to precise if it isnt , try to make the gaps for the suspensions on the rail a bit larger.

1 Like

I’m not a scripter so I don’t really understand your script well (to me it just looks like it tells the cart to move a certain velocity), but in my opinion I think your rail curves in a too great of an angle.

I think that the rail curves too greatly so the material of the rail blocks the cart arms, causing it to stop and glitch because of Roblox physics or something related to that.

One idea I have is to increase the rails curve length and decrease its angle to allow the cart arms, but another idea I have is to allow the cart arms to swivel left to right in order to compensate for the difference in the rail position instead of having all of it being entirely stiff.

See how the back part of the cart would need to fall off of the rail to allow the front to stay on.
This is a bad example but is supposed to show how allowing the arms to turn left to right can help with turning.

I’m not sure how well this would work so allowing each arm to simply move itself left to right could work as well. Take my advice with a grain of salt though, since I cannot tell if your issue is with Roblox physics or your scripts.

1 Like

Thanks for help, but that’s not the solution. I believe that there’s something wrong with the script.

1 Like