Component invalid on replication

hey ya’ll, so im having a problem where, when using replication, the ParticleSystemComponent that renders my bullet trail, is invalid and null on the servers side, even when it works fine on the clients side. When im not replicating the trail it works completely fin with out any problems. I’ve looked basically ever where and i cant find any one with the same problem, so any help is appreciated, thank you :slight_smile:

How the trial is spawned ( variable is replicated ):

how the trail direction is set and where the problem occurs:

Hi Jackalan17.

Particle systems cannot be seen by the server. They can only be spawned and used on the client.
On the server call a multicast event to then spawn the particle systems on the clients.

Hope this helps.


So i tried what you said and changed my function SetTrailOnSever event to multicast instead of run on server but its still returning the error

Hi Jackalan17.

I have just created a quick mock-up. Note the events can be organized better, I just wanted to capture everything in one screenshot. Ensure you are not trying to access the emitter in any way on the server.

I hope this gives you a better understanding.


Edit: In my example I spawn the emitter. For your logic just reprace the “Spawn Emitter” function with the logic you want to do on the particule component. You cannot replicate this component, so results will slightly differ on each client as each client will generate their own particles.