Your squares aren’t named so using get_node
would be very difficult, you could re-iterate through this node’s children, remembering that you created your squares in a column-first you might be able to get it by index with some math.
func get_child_by_tile(tile_x: int, tile_y: int) -> void:
var index := tile_y + tile_x * amounty
return get_child(index)
Ah but you also step by 50, I don’t think calculating the index is particularly easy here either since you are using such strange units.
Make sure to format your code pastes