My HUD Only shows updated values on the server but the clients HUD only ever shows the original values.
Here’s what the issue looks like the bottom HUD is the client and the top is server
Here’s the HUD draw code
void ACyberPlayerHUD::DrawHUD(){
if (CyberFont){
ACyberPlayer* plyr = (ACyberPlayer*)GetOwningPlayerController()->GetPawn();
if (plyr){
HealthText = FString::FromInt(plyr->CurrentHealth) + TEXT("/") + FString::FromInt(plyr->MaximumHealth);
class ACyberWeapon* Gun = plyr->EquippedGun;
AmmoCount = FString::FromInt(Gun->CurrentAmmo);
TotalAmmoCount = FString::FromInt(Gun->BulletsRemaining);
}
//Set font colour
FColor FontColour = FColor(255, 255, 255);
FColor AmmoFontColour = FColor(58, 143, 213);
//Display the Text on Screen
DrawText(Username, UsernamePosition, CyberFont, Scale, FontColour);
DrawText(HealthText, HealthCountPosition, CyberFont, Scale, FontColour);
DrawText(AmmoCount, AmmoCountPosition, CyberFont, Scale, AmmoFontColour);
DrawText(TotalAmmoCount, AmmoTotalPosition, CyberFont, Scale, FontColour);
}
}
Anyone have an idea why client HUDs don’t update