Yes, it’s still true. In this circumstance, using a bool value would be better than a remote function, since the client and the server don’t have to communicate twice to receive information. When the bool value changes, it replicates without needing an event.
Think of it like the server saying “im gonna change this bool value” and the client says “ok, i might need this later.” In this case, the client already has the bool value when the button is pressed.
However, if you want something to occur immediately after data changes, a remote function or event is more effective.
Are there any modules to your knowledge that create objects values and when data on the server changes it changes that object’s value and then the client and access it anytime?
ping test.rbxl (46.9 KB)
This is a place file for testing whether a value or a remote event gets sent faster. The server will first fire an event to the client with the data being the time it was sent at. Now the client recieves it and prints how long it took to get there. (plus a little bit from getting the time) After that, it does it with a number value instead, using a propertygetchangedsignal function on the client this time. And after testing it, I got the same results (give or take a little bit of .001’s for not having a consistent internet connection) for both of them.
you could have a VALUE object in the workspace. Have the server script update it. And have the client script check the value and if it has changed using
Wait what if you make it a parent of a “bool value object” and if that updates check its children that have been updated before the bool value object. Then use all those children objects to put together in the client?
Might not be a bad idea. And you will be checking for less changes.
You can do a for loop to check all of them like Get all children.
Yes, value objects are consistently updated by the replication system. I would still recommend an event for circumstances where you want the server to trigger an immediate change on the client rather than having a data repository via a value object.
If you want to go through with value objects, you could have multiple stringvalues in a folder to represent a dictionary ([‘ObjectName’] = ObjectValue), though I wouldn’t consider this a reliable method, and is generally considered bad practice.
I think we may be able to figure out how to give the client a whole dictionary without the use of remote events, this is exciting! Ill wait for your video
StringValues have a 200,000 character limit. If your dictionary isn’t massive, you could try using HttpService:JSONEncode() on the dictionary server-side, set the StringValue value to the result, and then use HttpService:JSONDecode() client-side to get the dictionary. I have no idea if this is worth doing.
Dude I think you may be ON TO SOMETHING, although I for sure would lose CFrame data and probably Color3 and all those special data types only in roblox lua, it would replicate the booleans, tables, strings, numbers.