Create Bullethole with onCollisionEnter

Hey guys!
I am scripting a shotgun and it have a prefab with multiple shots and that gun should have multiple bulletholes.
That’s what I made :

	void OnCollisionEnter (Collision col)
	{
		if(col.gameObject.name == "Bullet1")
		{
			RaycastHit hit;
			Ray ray = new Ray(transform.position, transform.forward);
			if(Physics.Raycast(ray, out hit, 100f))
			{
				Instantiate(bulletHole, hit.point, Quaternion.FromToRotation(Vector3.up, hit.normal));
			}

}
	}

But I don’t know why that doesn’t work.The bullet prefab also have Rigidbody and sphere collider.

Why do you use a raycast ? Since the OnCollisionEnter has been called, you know that you have collided with something.

After testing the tag / layer of the collided object, If your bullet has hit the wall, you just have to instantiate the bullethole prefab at the following point Collision.contacts[0].point and you also have the normal to the surface with Collision.contacts[0].normal

By the way, “It doesn’t work” doesn’t help at all to understand what’s the problem.

i want to use raycast but i cant
i want to see bullet going idk how to do that with raycast