Instance created in level blueprint is not replicating its material changes to clients?

Hi. I am creating a slenderman-type game where you collect pages. I have it set up so the level distributes pages randomly upon beginplay among an assortment of locations and then applies a material change to a decal on each page to give it that classic scribbles on a page look.

However, I recently noticed that player 2 does not see these material changes. Things I have tried:

The page blueprint has every component on it set to replicate

Using RPCs to tell clients to change the decal

What I think the issue is after some research is that player 2 joins after the material change has happened and so never gets that signal (in the case of an rpc). but I am confused because they clearly get the replication of spawning these pages, so why not the material change made right after?

I was seeing that I had to use repnotify, but I don’t see how to pass the target node through server to client since the page is created on the server.

Apologies for lack of pictures, I’m only allowed to post one image at a time.

Hello @sapotts ,Welcome back to the forums!

For multiplayer gameplay, when working with actors, anything that can be represented as state (persistent data) should be handled using replicated variables with RepNotify rather than one-off RPCs. RPCs only execute at the moment they are called, whereas replicated variables represent persistent state. This allows players who join late to see the correct state and ensures that a client who disconnects and reconnects receives the updated state without issues.

That said, here is a practical example of how to change the color of a static mesh inside a blueprint.

In the actor, in this case BP_Cube, you first need to create a boolean variable (bShouldChangeColor) and set it to RepNotify. Then, within the same actor, you create a Custom Event (ChangeMaterial) that contains the logic you want to execute, which in this example is responsible for changing the cube’s material. Next, in the OnRep_(bShouldChangeColor) function associated with the boolean variable, you simply call that Custom Event. In this way, every time the boolean value changes on the server, Unreal will update the variable on the clients and automatically trigger the OnRep function.

Additionally, it is essential that the Replicates option is enabled in the actor’s Class Defaults, since without this the actor will not replicate correctly.


Finally, in the Level Blueprint, you select the desired actors; in this case, I used Get All Actors of Class to obtain all BP_Cube instances in the map. There, you use a Switch Has Authority node to ensure that the logic runs only on the server, and from the Authority branch, you set the bShouldChangeColor boolean to true.

With this setup, the behavior should work correctly on both the server and the clients. If it is still not working, it would be helpful to see how the blueprints and events are set up, as having the full setup usually makes it much easier to identify where the issue is.

Hope it helps!

Read through the Networking Overview

At the bottom of the Replicating Actors section…

Several common features of actors, pawns, and characters do not replicate, such as:

  • Skeletal Mesh Component
  • Static Mesh Component
  • Materials
  • Animation Blueprints
  • Particle System Component
  • Sound Emitters
  • Physics Objects

Each of these run separately on all clients, however, if the variables that drive these visual elements are replicated, it ensures that all clients have the same information and each simulates these features in approximately the same manner.

Data Driven (persistent states) replication is what you’re looking for.