play prefab on collide

Hey Im noob at scripting and I need your help guys and girls, if you got time to help me it would me very nice :slight_smile:

I have a river with a box collider right under the water and I want to play a particle system when something is hitting the water, but how ?

" the particle system is a water splash "

oh I forgot to say, I want the water splash to be played on that place there something is moving " in the rivier"

thanks for reading this and if you got time and know how to fix this script please reply :smile:

I would start by taking a look at the OnTriggerEnter() function. If you want to continue to generate these effects while the object is in the water, you may also want to look at OnTriggerStay() (in this case you’d probably want to use a timer of some sort so that the effect isn’t generated continuously).