'Access none trying to read'

Hello, everyone!

I’m trying to solve this problem from couple days and i cannot get to conclusion why is happening. How i’m supposed to destroy the Emitter? If you ask why they are 2 Emitters it’s because if i destroy after the first one i get “Access none trying to read”.

1 Like

Hey there. Instead of DestroyComponent, go ahead and try Deactivate. No need to promote it to a variable. Just connect the return value to Deactivate. You might wanna put in some Delays as well. Let me know if this helps =)

Thank you for the fast reply. I didn’t knew you can do that as well, thank you. Back to the topic, no, it didn’t helped. I’m trying to “Deactivate” or “Destroy” because i’m trying to leave a trail behind the character but if you hold the “key button” it still spamming it. I want only on specific state = like only while he is running.

Hmm. Maybe you can look into the Do Once and Is Valid nodes. Are you trying to achieve something like this?:

If so, here is how I do it:

(dont mind the scribbling, most of the code is irrelevant except the emitter logic)

This is for multiplayer however it is pretty simple and similar to what you want. Instead of spawning the emitter, I added it as a component to my character, and deactivated it on default settings. When it’s called, it first sets CanDash boolean to false, then activates the emitter and after a period of time, deactivates the emitter, finally setting CanDash boolean back to true.

For your case, maybe it can be like this (rough draft, might need tweaking):

Wow, it’s like exactly like this, but is it possible to be because i’m not using VFX Niagara? I also tried with Niagara but the problem is that i cannot tweaks the effect there because i still have so low knowledge. I’m into UE5 from a week :smiley: Thank you once more, i’m gonna try your way with tweaking to see the results.