Answer the question
In order to leave comments, you need to log in
How to fix the error in if( Operator '!' cannot be applied to operand of type 'method group') conditions?
if(isDed == false)
{
pS.Play();
isDed=true;
}
if(!pS.Play)
{
Destroy(gameObject);
}
Answer the question
In order to leave comments, you need to log in
if(!pS.Play)
in this line is most likely wrong.
Play( ) is a method on the pS object.
You need the type bool in the condition, which means that you need to take either a variable from the pS object (for example, isPlaying) or call a method that returns bool.
I'll add a link to see what fields and methods are
https://docs.unity3d.com/ScriptReference/ParticleS...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question