You should parent it before you kill the player.
Here's some old code I found. When the ghost player touches another player, he kills them.
package playerGhost
{
//Snip
function armor::onCollision(%this, %obj, %col, %pos, %vel)
{
parent::onCollision(%this, %obj, %col, %pos, %vel);
if(!isObject(%obj) || !isObject(%client = %obj.client) || !isObject(%col))
{
return;
}
if(%obj.getClassName() !$= "Player" || %col.getClassName() !$= "Player")
{
return;
}
if(%this.getID() != playerGhost.getID())
{
return;
}
if(!isObject(%client.minigame) || !isObject(%col.client.minigame))
{
return;
}
//Snip
if(!minigameCanDamage(%obj, %col))
{
return;
}
//Snip
%col.damage(%client, "0 0 0", %col.getDatablock().maxDamage - %col.getDamageLevel(), $DamageType::GhostTouch);
//Snip
}
//Snip
};
activatePackage(playerGhost);
You should use .damage instead of .kill. That way it counts as one player killing another, not just some guy dying mysteriously. Change the damage type to something else though. There's a generic damage type but I don't have time to get what it is right now.