Delete one Spawned object udon

I have a Gun that shoots an object created with vrc instantiate.

I want the bullets to be deleted when they hit something and eventually use them to Teleport players who get hit by them. so I have the bullet destroy its self on a collision

After the first bullet is fired and hits something the gun will no longer shoot I think it is deleting the prefab the bullets are made from. How can I make the script only delete the clones of the bullet prefab that were made?

Would this work better? “bulletPrefab” is a public variable where you can dump your prefab. It’ll save bulletRB as a rigidbody variable so you can do stuff with it like add forces or w/e.

I figured it out I had so set the main gameobject variable to a new gameobject variable that could be destroyed without crashing the udon program