My client does the line trace and my server decreases the ammo when shot.
void AWeapon_Instant::Client_WeaponFire_Implementation()
{
Super::WeaponFire();
//Line trace code
Server_Shoot_Info();
}
void AWeapon_Instant::Server_Shoot_Info_Implementation()
{
//Decrease ammo when shot
WeaponStats.CurrentInAClip--;
}
This function is bound to my current ammo text (Bp picture)
When i shoot on the server the ammo decreases instantly but when i shoot from the client the ammo decreases with delay like it is lagging. Gif of what i mean
Shooting from the server. This one works perfectly.
https:///
Shooting from the client on a dedicated server. This one has a slight delay as you can see it sometimes skips 2-3 numbers, how can i fix this.
https:///