pathing system need some help

im making a system that uses spheres as check points. at the last sphere my square is supposed to slow to a stop

at first i figured a simple if then statement would fix the problem

Void OnTriggerEnter (Collider other) if( minSpeed < maxSpeed) {then minSpeed=0}

i know im writing it terribly but i figured if the number were to switch to zero when it hits the collider then the whole thing would just stop...i was very very wrong. if anyone has a better idea then please correct my stupidity

Try using time to decrease the speed:

minSpeed = minSpeed - Time.deltaTime

..and put that in an update statement. Of course, we could help you out directly with your code. If you want, you could post the whole block that directly controls the speed of your square.