C++ HUD Only Displays Updated Values On Server

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

It’s probably because your values are not properly replicated. Have a look there to get the basic information about replication :


yup, thanks for the help :slight_smile:

I updated my comment to answer, if you want, it would be great to accept it as a valid answer to help other people :slight_smile: