Godot error gdscrpt

godot 4.2.1

E 0:00:24:0788 character_selection.gd:38 @ next_car(): Index p_index = 3 is out of bounds ((int)data.children_cache.size() - data.internal_children_front_count_cache - data.internal_children_back_count_cache = 3).

Seems like your script is accessing an array element that doesn’t exist.