Does anyone know the best practice for replicating values that are changed often to clients?
As in a money value that is being updated every second and is in turn displayed on the client.
In the past, I’ve done this by storing values (IntValue, BoolValue, etc…) inside the player and reading them from the client, taking advantage of Roblox’s built-in replication. However, now I am simply storing values inside a table on the server.
RemoteEvents are an option, but I am worried about the performance implications behind firing one every second times however many players are online.
I want these values to be as up-to-date as possible, so I would like to avoid any intervals and the like.
I think you could have a value inside of the player or something like that and have the server change that value, correct me if I am wrong, because I am a little confused on what you are trying to acheive
There isn’t really a difference between the built-in replication and remote events? Other than remote events are controlled by the developer and not the engine. Where have you heard remote events are laggier?
Also, remote events are bunched up before being sent to use less bandwidth, so they might be slightly outdated, but it doesn’t matter unless you have 0 ping.
I guess I just made it up in my head. I think I googled “are remote events laggy” and I got “yes, when you rapidly fire them.” But that was a long time ago.
Remote events can make a game laggier, if you fire them really fast for a while, not because someone is on a low-end device. There’s more data to send → longer time for data to reach the client → longer time for the client to read all the data.