I made a reference to another script(gameManager) ?

it feels like I’m doing something because there’s no reference of the variable of another script in the dropdown list. pls help?

[SerializeField]
    private gm MainPlatform;

    public Transform SidePlatform;
    private Vector3 NextSpawnSidePlatform;
    void Start()
    {
        MainPlatform = GameObject.FindWithTag("gameManager").GetComponent<gm>();
        NextSpawnSidePlatform.x = 30.5f;
        StartCoroutine(SpawnSidePlatform());
    }

    void Update()
    {
          
    }

    IEnumerator SpawnSidePlatform()
    {
        yield return new WaitForSeconds(0.5f);

        Instantiate(SidePlatform, NextSpawnSidePlatform, Quaternion.identity);
        NextSpawnSidePlatform.z += 8.5f;
        NextSpawnSidePlatform.x = 30.5f;

        StartCoroutine(SpawnSidePlatform());
    }

And this is another script which i want to make a reference to

public class gm : MonoBehaviour
{
    public gmSidePlatform platformTwo;

    public Transform tileObj;
    private Vector3 nextTileSpawn;
    public Transform obstacleobj;
    private Vector3 nextObsSpawn;
    public Transform obsTwoObj;
    private Vector3 nextobstwoSpawn;
    private float Randx;

    public void Start()
    {
        platformTwo = GameObject.FindWithTag("SidePlatform").GetComponent<gmSidePlatform>();
        nextTileSpawn.z = 40;  // to set the position where it spawn (vector3)
        StartCoroutine(spawnTile());
    }


    public IEnumerator spawnTile()

Do you have an instance of “gm” in your scene? Or a prefab with it somewhere?

Generally, don’t ever write lines of code like this:

    platformTwo = GameObject.FindWithTag("SidePlatform").GetComponent<gmSidePlatform>();

I call this “hairy code.” Here’s how to give yourself a fighting chance of actually getting code to work:

How to break down hairy lines of code:

http://plbm.com/?p=248

Also, start injecting tons of Debug.Log() statements all over your code to find out what is going on. NOBODY here can do it, it is entirely up to you.