Working on a BP that allows the players to add names to the player character. Once the name is entered, I want it to be added to an array to have a list of names that have been used. For some reason I am only able to add the character name from the server, and not the client. I have tried everything that I know when it comes to replication, but I am also new at it. The information is stored in an Actor Component.
Any advice will help. Please see the attached picture.
As far as I know, you cannot just change replicated variable on client and wait for it to update on server. I think, you need to explicitly ask server to add new name into an array from client by using an RPC.
If array of names is set to be replicated (which it should be), then changes which will occur on server will be replicated on clients, without any need to call a multicast event to update it.
Create custom event that will be running on server, in which you will add new name into an array
I have tried everything I know and followed every advice that has been provide. For something reason, nothing works on the client, but it does on the server.
It is a widget and currently set up in the character on event begging play. it will check is the player has a name. I have attached a screenshot of my current setup.