Why do i get errors for my turret rotation blueprints?

Hi, can someone please explain to me why i get these errors. When i click on play it works properly, the turrets are following the player and spawning projectiles. But after the session ends it gives a ton of errors. Thank you. :slight_smile:

Your function “updaterotation” is calling GetPlayerPawn which, when the game is shutting down, returns invalid because the player pawn is destroyed/being destroyed.

When you call GetPlayerPawn, you should call IsValid before you actually reference it in SetWorldRotation.

Works perfect now :slight_smile: I was thinking it might have been something like that, but was not sure how to check if player is still alive. IsValid + Branch works fine. Thank you very much :smiley: