Replication not working with set world scale?

I have a project where I’m trying to replicate the scale of the cube. its working from the server to the client but the client is unable to replicate what is does back to the server, I’m pretty confused here and help would be greatly appreciated.

Replication is a strictly one way road, Server → Client.
In order for the client to change something on the server (and then have it replicated to all players) you will need to use a Server RPC.

1 Like

so how would i go about doing that?

im really confused here i have used replication before for spawning things or even doing things but i have never encountered something like this where the client wont replicate back im pretty lost here.

what i have set up in the picture is a server rpc no? it goes from server to multicast

Hi @mushroomDEW,
It appears, yes you do have a Server RPC and a Multicast in your original screenshots. My apologies for not noticing this, I was obviously replying based on the text in your second post, that’s my bad.

Why is not working? Because you have it in a level blueprint. You need to do the RPC within something that the player owns, either the character BP or the player controller BP.

If it is replicating anyway, get rid of the multicast, you don’t need it; you just need to get the server to do whatever (scale in this case, in the RPC) and then it will replicate to all clients.

NB: What are you actually trying to do here? Level BP will execute on Client and Server anyway, so it seems you are having the client tell the server to do something it would do anyway.

theres no client input there so the Tick should just run on server only (HasAuthority) and RepNotify the scale back, in the OnRep event set the scale to the new vector

I have just recreated a project and set up my problem again. i am trying to replicate a audio visualizer that is based off of the sounds the players make. I have followed this video (https://www.youtube.com/watch?v=nTCboJrkI8o&t=165s) to make a simple audio visualizer and quickly set up input for the players to start and stop sounds. i set up my rpc and it works for the server but not the clients.

There is input from the BP_ThirdPersonCharcter its set up with sound i didnt do a good job at showing it.

You have the RPC on the BP_AudioVisualizer, which the server owns, so it works for the server.
Move the RPC into your Player Controller to get it to work for everyone.

ah i see so rpcs from actors dont work?

thanks for all the help so far ill try that out I’m a bit new to replication so I appreciate all of the comments.

They will work if the RPC is called by the owner of the actor. Which effectively limits you to the Character or Player Controller (the only things that clients own which also exist on the server).

No worries, and good luck :slight_smile:

i have fixed my issue, the biggest problem i had was i was trying to replicate setting the world scale when i should have just replicated playing the audio from the players. (as the audio is what causes the scale to change)