diff --git a/scripts/death_collider.gd b/scripts/death_collider.gd index c83a426..4247335 100644 --- a/scripts/death_collider.gd +++ b/scripts/death_collider.gd @@ -10,5 +10,10 @@ func _ready(): func _process(delta): for body in get_overlapping_bodies(): if body.is_in_group("human"): + var player = body.get_multiplayer_authority() + rpc_id(player, "kill") print("Player collided with a death zone!") - Global.player_dead() + +@rpc("any_peer", "call_remote") +func kill(): + Global.player_dead()