Multiplayer client cant call take damage function but server can

the server goes though all this code but the client can get to the take damage function. Would it be because the take damage function only works on server, and if so the replicated attack function should do it right???

 void MyCharacter::Attack_Implementation()
 {
      // does raycast and calls take damage function on hit actor
 }

 void MyCharacter::TakeDamage()
 {
     const float ActualDamage = Super::TakeDamage(Damage, DamageEvent, EventInstigator, DamageCauser);

     HandleHealth(ActualDamage);

     return ActualDamage;
 {

 void MyCharacter::HandleHealth_Implementation(float DamageAmount)
 {
     Health -= DamageAmount;	

     if (Health <= 0.0f)
     {
	     Die();
     }
 {

 void AHero2Character::Die_Implementation()
 {
       // stop character moving
 }

Would i have to do something with the damageEvent

Wait sorry that was for different question

But in addition to this question Is there a problem with how the server functions are dealing with takedamage

Depends on the replicationtype of those methods. Are they Server or for example OwningClient.
If They’re Server, they’re not called by the client. However, be carefull with a client who is host, too. He can trigger those, and therefore might behave differently from pure client.

they all Server but is having them all server overkill