Replicated variable wont replicate

For some reason, even though I follow all the steps and I can see the replicated variable with the two dots as shown in the video, it won’t replicate to the client. Additionally, I can change it from the client, which I don’t think should be possible. I’ve confirmed that the replicated boolean is set to true, and it’s also checked in the blueprint. I can’t figure out what the problem is.

Hi and welcome to the community.
The first thing you need to do is check your code against the end of lecture.
Next, you need to ensure it isn’t a build issue. The easiest way to do this is close the editor and in your project folder, delete the binaries and Intermediate folder. Note this is unlikely to be the issue but try it anyway. When you open the project, it will refresh your build and you can eliminate this as an issue.

If you’ve done these and you’re still having issues, let me know and share the C++ file you made changes in - the header is probably important to see.

It’ll most likely be a small change.

As for changing the bool. Yes, the client can change these variables but the server always has the source of truth.

HI, I finally made to a solution. It took me some time to find someone with the same issue, and I supose that this is a bug from my version of the engine, but disabling the live coding checkbox solved the issue.

1 Like

Yeah, Live coding can cause issues. Often just exiting Unreal and rebuilding the project solves the issue as well. It is usually the first thing I do when I create a new project. Just in case…

I’m glad you got it sorted.

I spent the better part of a week thinking I had problems with my VS/UE setup(s) and I solved all of my problems by turning Live Coding off.
I’m not sure why something that basically everyone agree is experimental, at best, is on by default.

1 Like

I may mention this to the instructor. There are notes about this at the start of other courses and it may be worth adding here too.

Thank you. To be clear, the week I’m talking about has been before this course. I just started this course today. So, I’m not blaming anyone. It’s just UE problems. I always seem to have trouble working with UE5 and CPP. As long as I’m able to stick to blueprints it’s a beautiful world.

1 Like

I have found also, on the Thirdpersonmap blueprint, i deleted the node connector from Random Integer and then just reconnected it again with a new connection, it corrected for me without having to even go into the project folder and delete those folders, it also fixed the replication for me as well. (wasn’t working before i did it) Alot of times you will probably need to delete those three folders, but in this case i found the link that was messing up and fixed it by simply breaking the link, and then redo the connection.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms