Why doesn't my material change render on different clients?

Create a Struct for the cosmetics. Have an element for each aspect of the cosmetics you wish to modify. Keep the data types as simple as possible (float, int, string, name etc). You can use a data table for look ups. For example If I want specific Materials applied, then I’d use a Name type in the struct. Then use that Name as row name on a data table.

image

Data Table example

Set the Struct as a RepNotify. This will auto create an OnRep function.

Use the OnRep function to make the changes.

image


Implementation

Create a function or event to set a local dummy struct of your modifications. Then pass that struct to the server via RPC.

Servers RPC event will simply Set the RepNotify variable using the dummy struct values.

As Soon as the server sets the variable it gets replicated out. It also triggers the onrep function.

When clients get the updated variable it’ll trigger the onrep function on their end. Thus cosmetics get changed for each player.

This also works for later joiners and reconnects.