I'm attempting to make a path following function and I am getting an error that reads
invalid get index '0' on (base: PoolVector3Array)
this is the function in question
if !Patrol_path:
return
var target = Patrol_points[Patrol_index]
if translation.distance_to(target) < 1:
Patrol_index = wrapi(Patrol_index + 1, 0, Patrol_points.size())
target = Patrol_points[Patrol_index]
velocity = (target - translation).normalized * speed
velocity = move_and_slide(velocity)