void OnTriggerEnter(Collider other) { rb = other.GetComponent <Rigidbody>(); if (rb != null) { platform.AddToPlatform(rb); } }