How can I give a probability of an actor spawning?

I am trying to make it so when it spawns (Event BeginPlay) it will have a 50/50 chance of spawning, after 2 seconds it will reset; giving it another 50% of spawning or not. Like flippping a coin

Like this:

The code to kill the actor after 2 seconds is inside the actor itself. That way, you don’t have to manage it…