Replication of spawned object, server cannot see it


This is simple testing code, actor i spawn is just a simple actor with static mesh that i made in blender, actor is set to be replicated, all clients can see the actor spawning but the server doest.

Remove both switch authority nodes.

Edit: Also, since the actor is replicated, you only need to spawn it on the server like chrudimer said below; a replicated actor gets replicated to all clients.

actor is set to be replicated

Hi, if its replicated, then you only spawn it on the server (it will automatically replicate to the clients). So from your AttachMP18Server you directly spawn it. AFAIK the AttachActorToComponent then should happen on server and all clients, so e.g. make the “Mp 18StaticMesh” variable RepNotify and then inside the OnRep function attach it.

What you’re doing currently, is: Input Event → ToServer → ToAll → (only client continues here since SwitchHasAuthority Remote) Spawn it locally on each client

1 Like

Never used Repnotify in replicate, will give a shot