Replicated or RepNotify

Hi, Hope you’re doing great. So I was replicating a particle system to make it spawn on the Client side but it was not working. This is what it looks like.


Even though I replicated the health too but still, it wasn’t working so I changed the method of replication from setting the particle system to replicate I created a rep notify on boolean and it started working. Can someone explain to me why it is working now and did not work simply by replicating the particle system?
This is what the new method looks like.
image

Replicating a variable and an object/actor are two different things.
A variable holds a reference to an object in the world. If you replicate that variable, it replicates that reference, but doesn’t necessarily replicate the object. If the object is not replicated, the variable remains null on the other side since the reference points to something that doesn’t exist. If you replicate the actor and not the variables referencing it, the actor will exist on the other side but variables will remain null.

Visual effects and sounds are not supposed to be spawned on dedicated servers, so by default they are never replicated. You are generally expected to use a replicated event (multicast or repnotify) to spawn those effects directly on client machines.

1 Like

Thank You so much <3