How to set an object reference of an actor that is spawned in?

The fridge can also spawn potatoes, but only if you press the potato button, and the carrot button is the only thing that spawns carrots