Only one gameobject moves but i have 2 other identical objects that dont

This is really frustrating, any help would be much appreciated!
I will provide some screenshots of unity if needed, but I don’t think that’s the problem. Then again, I cant figure out this so what would I know
(2d)
code:

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

public class GroundMovement : MonoBehaviour
{
    public float globalspeed;

    public GameObject Ground1;
    public float Ground1Speed;
    Rigidbody2D rb1;

    public GameObject Ground2;
    public float Ground2Speed;
    Rigidbody2D rb2;

    public GameObject Ground3;
    public float Ground3Speed;
    Rigidbody2D rb3;


    // Start is called before the first frame update
    void Start()
    {
        rb1 = Ground1.GetComponent<Rigidbody2D>();
        rb2 = Ground1.GetComponent<Rigidbody2D>();
        rb3 = Ground1.GetComponent<Rigidbody2D>();
    }

    // Update is called once per frame
    void Update()
    {
        rb1.velocity = new Vector2(globalspeed + Ground1Speed, 0);
        rb2.velocity = new Vector2(globalspeed + Ground2Speed, 0);
        rb3.velocity = new Vector2(globalspeed + Ground3Speed, 0);
    }

}

Sorry to hear it’s frustrating but if you want help, it might be good to actually discuss and describe what is frustrating i.e. what your expecting and what is actually happening otherwise how would anyone know. :slight_smile:

I know you put something in the title but you should try to ellaborate on the setup here. Images always help so don’t go waiting until someone asks if possible.

At a guess:

rb1 = Ground1.GetComponent<Rigidbody2D>();
rb2 = Ground1.GetComponent<Rigidbody2D>();
rb3 = Ground1.GetComponent<Rigidbody2D>();

Shouldn’t those be Ground1, Ground2 & Ground3. As it is, they’ll all refer to the same Rigidbody2D.