How to Spawn Partical Impact effect in lua?

I’m trying to figure out how to spawn the impact effect at the raycast’s hit location. But I’m not sure how to spawn slices. How to do it in lua. Thank you for your help.

I figured it out >>

First Create A partical effect or object you want to spawn in editor

then create a slice from it and save it to a folder

then right click on it in the asset browser in the folder you placed it and set is as a dynamic slice

then create an empty entity in your scene

then add a spawner object to it and a lua sciprt component

click on the search button on the spawner to locate the slice you just saved to add to it

then in your lua component put a script we will make

in your lua script this is what it should look like >>>>>

^^^^ press play and it will spawn your slice :smiley: