Infinite loop in branch? Infinite loop error bug

You can put the delay right before the branch.

Also, there’s no reason delays can’t be used in fucntions.