Hello Kirrong Twam, welcome!
You can create a button that spawns an object by adding a button, adding an “If Mouse Click” event to it, and under the “If Mouse Click” event, add a Cube.
Then, inside the cube settings, set the cube’s position to the camera’s position.
Here is an example:
www.gamemaker3d.com/player?pid=01664967
Regards,
Cyberix3D team