NameColor doesn’t seem to be repnotify (where you set the variable there is no “SetWithRepnotify” and the function you show is called OnRepNamenColor, not OnRepNameColor). Did you make sure that you have marked NameColor to be repnotify and not replicated?
Also if you mark a variable as repnotify it will automatically create the OnRep function.
But what should the event do?
You use the player character to replicate the change from the client to the server (RunOnServer event) and then from the server to all clients (that’s the repnotify). Then all clients apply the change locally (that should happen inside the OnRep function then). So what you have above in those two images looks good, but you need to make NameColor repnotify and not just replicated.
Yes my mistake, marked it as replicated. I changed it to repnotify and edit the created function. It still doesnt work. All instances (Clients and Server) have the same color the server picked.
I call the setcolor event on begin
play (player character)
Do have something like “IsLocallyControlled” check to only execute the SetColor Event on the local client? (since you want the local client to tell the server its color)
In 3 png you’re not sending the NameColorLocal through the UpdateColor RPC to the server and just using the default value on the server, so you also need to send the NameColorLocal from the client to the server and use that.
What do you mean exactly? The update color node sends the variable to the server or am I wrong? The rep notify updates the color on all clients.
So which rpc or note should I add to get it working?
In your image 3 png above you’re not sending anything through the UpdateColor RPC. If you want to send something though the RPC, then you need to add inputs to it, same as you would do for any CustomEvent.