OnCollisionEnter2D question

Hello every one …

private void OnCollisionEnter2D(Collision2D col)
    {
           if (col.relativeVelocity.magnitude > 5)
         
         Instantiate(FallDust, transform.position, Quaternion.identity);
    }

i put this script in a multiple cars that keep falling from the sky and the code job is to create dust when its hit anything if the speed was greater than 5 and its works fine ,But even if the car was not moving and other falling cars with speed>5 hit it both cars will create dust the one with speed=0 and the other one with speed >5

You have if the collided object has magnitude >5 then the object the script is on gets the dust, change Instantiate(FallDust, transform.position, Quaternion.identity); to Instantiate(FallDust, col.transform.position, Quaternion.identity); to get the transform of the collided object instead.