Gun Fire, sparks on Collision

I am working on an fps. The gun fires an invisible projectile. How do i make sparks on an object like a wall when the projectile hits it.

use an OnCollision function and under it instantiate a spark prefab. Pay attention to the second section of code, it's pretty much what you're after.