DaveTheCoder
Yes it's different, I meant Unable to iterate on object of type 'Nil'.
error is looks pretty same, sorry for the confusion
`func thread_process(userdata):
while(true):
for c in objects.get_children():
var cx = c.object_position.x
var cz = c.object_position.y
var px = floor(player.position.x / Global.DIMENSION.x)
var pz = floor(player.position.z / Global.DIMENSION.z)
var new_x = posmod(cx - px + load_radius/2, load_radius) + px - load_radius/2
var new_z = posmod(cz - pz + load_radius/2, load_radius) + pz - load_radius/2
if (new_x != cx or new_z != cz):
c.set_object_position(Vector2(int(new_x), int(new_z)))
c.generate()
c.update()`