Having an object fall down from top of screen from random x value

I’m currently making a game where numbers are supposed to fall from the top of the screen to the bottom. But i’m having trouble getting the numbers fall from random values from the top of the screen to the bottom. Can anyone help me?

you can print a number to a empty screen with
text(“3”,posx,posy);
and increase posy in every loop
but first need to setup a random posx.
posx=random(10,width-10);
see also here

1 Like

Post what code you have so far.