I wanted to create custom death. When the player die, his death changes to death by laser gun. I create a fake player and then kill him with a laser gun. But when I run my plugin, the fake player doesn't die.
Why doesn't the player die?
My code
private void PlayerEvents_Death(LabApi.Events.Arguments.PlayerEvents.PlayerDeathEventArgs ev)
{
var d = DummyUtils.SpawnDummy();
d.roleManager.ServerSetRole(ev.OldRole, RoleChangeReason.Respawn);
d.transform.position.Set(ev.Player.Position.x, ev.Player.Position.y, ev.Player.Position.z);
d.playerStats.KillPlayer(new DisruptorDamageHandler(null, UnityEngine.Vector3.up, int.MaxValue));
}

