Sphere falls very slowly when it has any forward momentum

Hello! I’m programming some rails for balls to roll down. I made it so that the ball, as long as it is on both rails, will move along the forward vector of the rails until it is no longer on them. However, whenever it goes off the rails, it slowly glides to the ground instead of falling. I used a Rigidybody for physics.
Does anyone know why this would be?
Here is my code:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Belt : MonoBehaviour
{
    private List<Rigidbody> CrossRefrence = new List<Rigidbody>();
    public List<Rigidbody> rb = new List<Rigidbody>();
    public GameObject OtherRail;
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        for (int i = 0;i<CrossRefrence.Count;i++) {
            if (OtherRail.GetComponent<Belt2>().rb.Contains(CrossRefrence[i])) {
                rb.Add(CrossRefrence[i]);
                CrossRefrence.Remove(CrossRefrence[i]); //This is was I needed to add

            }
        }
        for (int i = 0;i<rb.Count; i++) {
            Vector3 v = transform.forward*5;
            v.y=0;
            rb[i].velocity=v;
            
        }
    }
    void OnCollisionEnter(Collision other)
    {
        CrossRefrence.Add(other.collider.gameObject.GetComponent<Rigidbody>());
        
    }
    void OnCollisionExit(Collision other)
    {
        if (rb.Contains(other.gameObject.GetComponent<Rigidbody>())) {
            rb.Remove(other.gameObject.GetComponent<Rigidbody>());
        }
    }
}


Your problem is that line 25 above wipes out the .y component of the Rigidbody velocity.

Instead, copy out the Vector3 velocity, modify the x and z, and assign it back.

Ok. I found the solution. The problem was that when I checked and found that the ball was on both rails, I would add it to the list every frame until the ball was no longer touching both rails. Then, when the ball stopped touching the rails, one of the 100s of duplicate list objects would be removed, but all of the other ones would remain, making the ball infinitely propelled forward, causing it to glide. Here is my fixed code:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Belt : MonoBehaviour
{
    private List<Rigidbody> CrossRefrence = new List<Rigidbody>();
    public List<Rigidbody> rb = new List<Rigidbody>();
    public GameObject OtherRail;
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        for (int i = 0;i<CrossRefrence.Count;i++) {
            if (OtherRail.GetComponent<Belt2>().rb.Contains(CrossRefrence[i])) {
                rb.Add(CrossRefrence[i]);
                CrossRefrence.Remove(CrossRefrence[i]);

            }
        }
        for (int i = 0;i<rb.Count; i++) {
            Vector3 v = transform.forward*5;
            v.y=0;
            rb[i].velocity=v;
            
        }
    }
    void OnCollisionEnter(Collision other)
    {
        CrossRefrence.Add(other.collider.gameObject.GetComponent<Rigidbody>());
        
    }
    void OnCollisionExit(Collision other)
    {
        if (rb.Contains(other.gameObject.GetComponent<Rigidbody>())) {
            rb.Remove(other.gameObject.GetComponent<Rigidbody>());
        }
    }
}

Thank you for your help, though, I really appreciate it, even if that wasn’t the problem!