Rep notify only runs on client

I want to Spawn an Emitter at the player`s location while I pressed the X button, so I write this function.

But when I press the X on the client, only client spawn a emitter, what should I do to make both Server and client can see the emitter

A simple way to fix this is to make a function that sets the variable and make sure its replicates is set to “Run on Server”, this will make sure the variable is set from the server. RepNotify only runs correctly when its set from the server, if a client sets the variable it only runs on the client that changed the variable.

271249-executebuttonpressonserver.png

271250-runonserver.png

Hope it helps!

thank you!