This issue refers to this forum’s post
Calling RestartPlayer() from the Role_Authority does nothing
APAGameMode* gameMode = Cast<APAGameMode>(GetWorld()->GetAuthGameMode());
AController* myController = GetController();
if (gameMode != nullptr && myController != nullptr)
{
if (GEngine) GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Magenta, FString::Printf(TEXT("CALLING RESTART_PLAYER")));
gameMode->RestartPlayer(this->GetController());
}
The debug message “CALLING RESTART PLAYER” is shown, so both the GameMode and the Controller are valid.
However, the RestartPlayer() function does nothing!