Replication troubles

Hello, I’m making a project, and in said online multiplayer project, I have a character that can set down runes. Problem is, when my client sets a rune down, it affects the server appropriately, but nothing happens to the rune in the client. And when the server sets down a rune, the client gets affected twice, as if two runes were set down. I’ve determined (when the server places rune) the rune on the client disappears before the rune on the server. Anybody have any Idea what’s going on. the rune is set to replicate, and here are some code screenshots:
UE4Pic006
UE4Pic005

It looks like DownCast is a multicast RPC. In that case it will both be executed locally “on the server as well as all currently connected clients.” (see RPCs | Unreal Engine Documentation). Since LightningRune is replicated as well (and relevant to a client) the built in replication system will cause another LightningRune to be spawned on clients so you end up having two. To fix this the LightningRune should only be spawned on the server. The replication system will deal with the rest for you and create them on the clients as well. So get rid of DownCast and directly call SpawnActor in the DownEvent.

2 Likes

It worked! Thank you so much.