How does the replication works ? How does the replication works ? Variable does not change on client when modified on server

Hey !

Iam really new to UE and blueprints so it may be my mistake but I didnt find it.

Iam trying to make a player with a gun. Player has a variable “equipped weapon”. Weapon has an event “pull trigger” which has to spawn bullet and decrement ammo on the server and then multicast audio and visual effects. Bullet is spawn, ammo is decremented on server but…

1) Audio and visuals are called only on server. I can see how its called in bp but without effect on client

2) Ammo variable change on server does not replicate to client

I think these jpgs will tell you more.

Event pull trigger in gun bp

Event multicast audio/visual effects

Show current ammo in UI

Is there a problem in the way i understand the replication and the client/server events ?

,

Got it working after rebuilding it from scratch

Do you care to share what you did different in your rebuild so others looking in the future can see how it was done?