Nodes Are Spawned for Host But Not for the Client

Godot Version

GodotSteam 4.4

Question

Why does this function work for the host but not for the client
The Auto Spawn List also includes the same enemy paths, so I don’t think it’s a security issue !

func _on_spawn_timer_timeout():
	if not multiplayer.is_server(): return
	if enemies_spawned_this_level >= enemy_count or available_spawn_points.is_empty():
		spawn_timer.stop()
		return

	var spawn_position = available_spawn_points.pick_random()
	var enemy_scene_path = ENEMY_SCENE_PATHS.pick_random()

	var data_to_send = {
		"scene_path": enemy_scene_path,
		"pos": spawn_position,
		"name": "Enemy_" + str(randi())
	}
	enemy_spawner.spawn(data_to_send)
	print(data_to_send)
	enemies_spawned_this_level += 1

Because your first line literally says if you’re not the server, don’t execute this code:

Yes but he uses a multiplayer-spawner afaik, therefore only the server has to spawn them

Fair enough. But I don’t see enemy_spawner having a spawn_function being set. I went to go look at an old project of mine and I believe if that’s not set on the clients they won’t spawn anything.