If you using godot 4.0 Beta 11 and probably newest betas these are solutions for this video. Ther is a bug which so far it isn't resolved since Godot 4.0 Alpha 3, still dosen't work in Godot in 4.0 Beta 11 You can't use "not" or "!" infront of Array if that array is "var", it only works when it is "const". GDScript 2.0: Can't use not operator (!) with String, Dictionary, or Array unless const. 1* 5:10. # If that bug will be resolved code below should work in future. # func get_next_random_map_coord(): # if not random_map_coords: # fill_map_coords_array() # return random_map_coords.pop_front() But below you will find two solutions for his problem. I was recomended 2 solutions to solve this problem. * First solution similar to orginal code, insted of using 'not' i should use 'is_empty()'. # if random_map_coords.is_empty(): # fill_map_coords_array() # return random_map_coords.pop_front() ** Second solution is to use the ternary operator. In this case you would check the lenght of the array. # func get_next_random_map_coord(): # return random_map_coords.pop_front() if random_map_coords.size()>0 else fill_map_coords_array() I was informed those two options are best solution because this way will make your code more readable and clean. I have used first solution and everything works fine for me!. 2* 6:00 In Spawner gdscript add this: @onready var navmap = $"../NavigationRegion3D"