Why does casting from Game Mode to my bot's AI blueprint always fail?

I am trying to set up a respawn system. In the game mode blueprint I connected Event Begin Play to a cast to my AI but it always fails. Why?

You are casting the default object for a botAI as a botAI, which really doesn’t make any sense. Casting takes an object of any type and tries to give you it to use as a botAI. However, to begin with, you’re not giving the cast an object. Furthermore, I don’t think Begin Play on Game Mode is where you want to be doing whatever you want to do. If you are wanting to “spawn” a botAI, you use SpawnActor on Begin Play, and then tell it to spawn a botAI type.

Casting is sort of converting some data type to another, this means you have to cast something TO something. From your description it seems you have a cast node with just the exec pin plugged into EventBeginPlay which will not do anything. If you are trying to spawn an AI pawn then you can use a SpawnActorFromClass or SpawnAIFromClass. SpawnActor is just an actor that will need to have an AIController assigned to it while SpawnAI will spawn an actor and create a new AIController and assign it.