The actor destroys itself automaticly

So I tried to prepare a simple loot pick up system. The idea is simple. The AI dies and the coin is spawn. Then I take the coin but I can’t. After the AI dies the coin destroys itself automaticy. What should I do now. Can anyone help me? Thank you. Here is my blueprints.

Is the cast in LootPickUp right? If so, then when you spawn the pickup, the AI still exists, which then triggers the overlap event causing the LootPickUp destruction.

Shouldn’t the cast be to the player?

The cast in the LootPickUp is right. So what am I supposed to do now?

Ok, i’m lost. Who is SimpleAI? Is it you, the player or is it the one that dies and a pickup appears in his place? Is this SimpleAI the one that collects the coin?

The Simple AI is the computer. And yes the Simple AI is who dies and a pickup appears in the place and I am the one who will collect them, I mean the player.

Yes you are right, I was wrong, I changed the lootpickup system as cast to maincharacter then it worked. Thank you so much.

But according to the script in lootpickup, it’s the SimpleAI that collects it. So, unless your player is also a SimpleAI, then that cast is wrong.

But maybe I’m just interpreting this all thing wrong. So, assuming I’m wrong, then you can set a tag in the player, and on overlap event with the pickup, check if the overlapped actor has that tag. If yes then collect, else ignore.