How can I make a script, when an enemy NPC dies show an object, example show a cube after he dies.
Are you using the NPC AI Kit by standardcombo?
I am using the default NPC kit.
I already understood what you meant. yes i'm using that kit
Ok, so the good news here is that standardcombo already thought about Loot and support with the NPC Kit.
In Community Content, import "Loot Drop Factory". This comes with info on how to use it, but even out of the box it will work.
On an NPC, you have a LootId property. This works with the Loot Drop Factory.