Replication Not Firing Reliably?

I have this function that triggers when the character jumps.

My problem is that this does not trigger 100% of the time like it should, its a part of my grinding mechanic and it deals with launching the character off the rail, it will always remove them from the rail but sometimes the launch character doesn’t seem to be applied to it.

Am I replicating this function properly? I have it set to reliable so I’m not sure why it’s not working.

Also this seems to replicate perfectly when testing in the editor with both listen/dedicated servers it’s only when I compile and test the server in an actual dedicated or listen when it doesn’t trigger all the time.

Any help would be appreciated thank you!


IsGrinding has to be true and it is being set to false both by the Server and Client plus you are replicating it from the Server to the Client. You don’t show where you set IsGrinding to true but it is definitely the problem.

I have a print string and it shows that isGrinding is being set properly on both the server and client in the editor, I’ll compile and get back to you if this is the case testing outside the editor.

It is very rare that you need to set a replicated variable on the client. You either Set a replicated variable exclusively on the Server or don’t replicate the variable and set it locally.

The exception would be if the client predicts the outcome and set the variable ahead of time. The problem with this is if the variable changes often that the client could go out of sync if its prediction doesn’t match the server.

I worded that wrong I meant that its being replicated on the client, that bool is being set from the grinding function I have but that in itself isn’t being replicated apart from all the variables in it that are.

I didn’t touch anything but it seems to be working when testing outside the editor now, thank you for clarifying some things on replication that I wasn’t aware of though.

I’m assuming it was a case of lag from the listen server etc that made me assume this was the cause.