I can’t fond solution to this error: MissingReferenceException: The object of type ‘ParticleSystem’ has been destroyed but you are still trying to access it. Your script should either check if it is null or you should not destroy the object.
I am new to unity and i am trying to play particles whenever player jumps. It works for one jump but then i get this error. I don’t know what to do.
my code:
using UnityEngine;
public class particle_activate : MonoBehaviour
{
public ParticleSystem jump;
public void Update()
{
if(Input.GetKeyDown("space"))
{
jump.Play();
}
}
}