Instantiate at wrong position

I have a problem and hope someone can help me with this one. I have an enemy, once it is being killed it spawns points which the player can collect. So far this works all well. The problem I am facing is thst the Points do not spawn at the Location where the enemy was defeated, instead they always spawn at the location set in the inspector for the points prefab.

function Death()
{
	Destroy (gameObject);
	
	for (var i=0; i < points; i++)
	{
	var pointsPrefab : GameObject = Resources.Load("Prefabs/Points/Points");
	Instantiate(pointsPrefab, transform.position, transform.rotation);
	}
	
}

well transform.position will spawn the point at a position where the gameobject with that script is attached, instead of “transform.position” try that “Enemy.transform.position”

Enemy is a GameObject variable here…