It’s not a very weird error, it’s telling you exactly what’s wrong.
My shot-in-the-dark is that your particle emitter prefab has Autodestruct on and kills itself before your script gets to it.
My thoughts exactly. The duration of the emitter is probably less than the script is waiting.
I turned it off with no success…
I feel like I could have an easy misunderstanding (plus, since the code do not work…). What is this code supposed to do ?
By the way, what is the use of private var del = false ? You never use it.
scrape code from a part I deleted.
its a part of my flame thrower.
The script should have worked (100%) with the deleted part ?
What did you delete exactly ?
Well its created the flame at ShootFromHere. Once the mouse is released, the flame is set to min 0 max 0 to make it look like it was turned off. Then, it would be deleted.
The bug does not happen right away. You have to use it for awhile to make it start.
Here is a demo of it http://www.creativecodingstudios.com/Unity/UserData/testy/Flamesv1/
Whenever you see the flames just dissapear while your holding the mouse button, thats when the error is.
Whoever can solve this gets a Unity ticket if I win.
(btw, the script is for the fabricator contest).