I've got an if statement that is not playing ball. This seems really straightforward, but when I run the scene, the if statement never loops. It also doesn't revert to the else statement or throw up any errors. One sad, lonely enemy spawns and wonders why it has no friends. I'm at a loss and would love some help.
func enemy_spawner():
var enemy_spawn_array = spawn_positions.get_children()
if spawn_position_number < 7:
var enemy_instance = enemy_scene.instantiate()
get_tree().root.add_child(enemy_instance)
var spawn_position = enemy_spawn_array[spawn_position_number]
enemy_instance.position = spawn_position.position
spawn_position_number += 1
else:
spawn_position_number = 0
$SpawnTimer.start()