How to have multiple enemy spawning nodes?

Godot Version

v4.6.3.stable

Question

I’d like to create a node which encompasses an area. The node will detect whether the player has entered its area and then spawn enemies in random locations within its own area.

I have a node that sort of does this, however if there are multiple of these nodes in one scene they will all spawn their enemies in the first node’s area instead of their own. They do seem to properly detect the player, however.

extends Node3D

@export var enemy_scene		: PackedScene

@onready var spawn_location : PathFollow3D	= $SpawnPath/SpawnLocation
@onready var mob_timer		: Timer 		= $MobTimer

func _on_mob_timer_timeout() -> void:
	# Create enemy instance
	var enemy = enemy_scene.instantiate()

	# Choose random spawn point
	spawn_location.progress_ratio = randf()

	# Initialize enemy position
	enemy.initialize(spawn_location.position, GameManager.get_player_position())

	# Add enemy scene
	get_parent().add_child(enemy)

func _on_player_detector_body_entered(body: Node3D) -> void:
	# Start spawn timer if player enters area
	if body == GameManager.player:
		mob_timer.start()

func _on_player_detector_body_exited(body: Node3D) -> void:
	# Stop spawn timer if player exits area
	if body == GameManager.player:
		mob_timer.stop()

Here is the node and its children:

The paths are used at the perimeter of the spawner node’s area and when combined with the randf() function in the script it makes enemies spawn in a random area within that area.

Why are enemies spawning in another spawner’s area? What can I do to make this work with multiple spawners in the same scene? Should I scrap this spawner and use something else?