Still need help putting things in random places

k for a long time ive been tryin to make powerups and now i finally got it workin except when i assign the powerup’s x coordinate to the math.random function it goes all over the stage how do i get it to only randomize once so it just chooses a random x coordinate and stays at that one i also need to use this for choosin wut powerup to come down like if the random number is from 1-25 for this powerup ect. can sum1 help me?