Thanks, i updated the code and added a counter for the array index, but now i have a different problem. The spawners fly far away instead of moving with the player like I can do on the scene editor. Any ideas how to fix this? Or maybe there is a better way to implement what I want.
P.s. I took the initial values of the position of the spawners in the startspawnpositions = [], so that I could reset them every cycle, and add the value of the player's position.
var points
var start_spawn_positions = []
func _ready():
points = spawnPoints.get_children()
start_spawn_positions = points
func _process(delta):
var i = 0
for Marker in points:
Marker.global_position = player.global_position + start_spawn_positions[i].global_position
i += 1