Question about collision

I have an object with script that has a variable “number”.
And another object that has script and variable “num”, so the question is how on collision of this objects I can equate number and num? Thanks!

Maybe this works for you

 //Put this in the num Script

    void OnCollisionEnter(Collision col)
 //Put this in the number Script

    void equate(int num)
        		number = num;

Found information at .

This is my solution :slight_smile:
void OnCollisionEnter(Collision collider)
myName = collider.gameObject.GetComponent().name;