Switch Character Controller from Ai to Player Controller and back

Hey Guys,
Im not sure if my last question was postet so I try again. I have srciptet an AI to control my character, but I need to switch some times during the game is running to a player controller so I can Control the character by myself. My whole script is in the Level Blueprint and I know it’s not the best way, but til now it worked very well. When I create a Blueprint for my Character my Script stop working at all. I hope somebody can help me. Sorry for my bad english.

First of all Player Controller and AI Controller are under same base class Controller, which means possessing works exact same way on both, You simply unpossess pawn in one controller:

And possess it with another:

And you do the same other way around. I recommend you to implment this as a function

Also Level Blueprint may work for you now, but when you gonna create new level you will need to copy everything. So move your script to GameMode, from there it will work everywhere.

Thank you so much!