Have an object play an animation where it is instantiated.

I have an object instantiating at an enemy when it is destroyed. I’m trying to get that object to play an animation at the location it was instantiated at, but since it’s coordinates to the enemy are 0, 0, 0, when the enemy is destroyed, the object gets placed at 0, 0, 0 in the world when the animation starts. This isn’t a problem with the instantiate because it works perfectly without the animation attached.

TL;DR - tell me how to get the animation to play where it is instantiated.

Parent your animated object to an empty gameobject and instantiate that one. If animation is on the topmost object, it will run in relation to world, otherwise it will run in relation to parent.