I’m trying to make a loop, that would access each Area2D in an array generated by the Area2D.get_overlapping_areas() and trigger a function in each of them. To make the loop iterations adjust to the number of Areas in the array, I was trying to use the .size() to use as the limit for the loop. But the project crashes every time on the line trying to get that array’s size, with the error message being "Invalid get index ‘size’ (on base: ‘Array[Area2D]’). I’ve checked, and it’s definitely creating the array, and it’s not empty, as the game starts with one Area2D already overlapping, so the array starts out with values.
I’ve run out of ideas how to fix it, maybe the array generates empty for the first tick and that causes the issue, or maybe it’s not even an array, and it’s my mistake for assuming so