You’re choosing a random lane every loop, so it isn’t going to be a straight line as the coins will be scattered.
If you want it to choose a random lane and spawn all the coins in that single lane, you should do it before the for loop and store the value into a variable to be used as the Y value.