How to put object at a certain random position

Hi i’m trying to make a whack a mole game. In this game we have 9 holes and 9 different graphics that will pop out. I’m not sure how to code the objects so that each time they pop up at a random holes.
Thank you in advanced :slight_smile: !

whack a mole

Use the condition “Pick a random object” with the hole, and an action “create object” with as position Hole.X()/Hole.Y().


Hi @arthuro555 , Thanks for the code, its work :grinning:.
How about if i want the 3 holes to have 3 diifferent randomly costumes popping at the same time? Everytime you clicked play, the costume will randomly appeared to the 3 hole without having the same costume. Really appreciated if you can help me on these :sneezing_face:

The code so far: