Actor spawn on server but not on client ( replication )

Hi, I’m trying to make my character shoot a bullet, I checked the “Replicates” check box in the blueprint of the bullet, and I am spawning it on the server side, but the bullet doesn’t spawn on the client side. The bullet does spawn on the server side, so the function is working. I’m using version 4.7.3, can someone help me ? Thanks!


You need to make the spawn happen in an event that executes on the server.

Make an event -> Details -> Replicates “run on server”

So it should be like vanlacke says

Shoot -> CUSTOM EVENT (your event name here)

(your event name here)set to Run On Server-> SwitchHasAuthority->SpawnActor BP Bullets Normal

It surely run on the server, because I have a “SwitchHasAuthority” in the second screenshot, and the bullet spawn on the server side.

The shoot method is called from a timer that is set on both client and server side, ( so the client can make the effects and sound,… )
The timer is set in a repNotify function :
Capture.PNG