Replicating tables to client and server

i need a reliable way to replicate tables to server → client or client → server, i also want the table to be datastorable

2 Likes

bumping this up ;-;… OH NOO! (30 limtit carr vrom vrom)

2 Likes

iirc you can just send tables through remoteEvents, although metatables aren’t retained and you should probably compress your data if it’s alot

2 Likes

the problem about remove events that i rlly need to change alot. like my tables use table.create table.rename and more things. so it means after each create function is done or delete function is done it sends the table to server and server has that table to do nothing but then say for example now server does something aka create something so table.create and at the end of the function i send that server made table to the client so next time the client does a function it knows where to begin but the thing is cant i do something like a table.changed (im rlly terrible at metatables). one thing to add i think i can do a system where a serverscript sends a list of functions and arguements with it and depending on the arguementss it fires the functions localside. but really i dont know which method i should make or where to begin since i can do any of them but its too bad if it didnt work properly i also tried abusing httpservice by using :jsonencode and decode to put the table inside a stringto replicate it but at the end it failed misrebily and didnt work it was rlly messsed up

Summary:

  • Remote events will require me to change alot in the functions

  • Another method is using removeevents but at the end of each function it fires the remote event from server to client or client to server sending the table to the opposite machine

  • Another way is using table.changed, even though im rlly bad at metatables :smile:

  • The last is me abusing httpservice by using the jsonencode and decode function to store the table in a string to replicate it but failed

  • What method should i usee???

1 Like

could try to describe what you’re trying to achieve a little more clearly? im pretty confused especially because table.rename is not a lua function(?)

1 Like

They’re a custom function i made but i fixed it not using metatables, i used the remove events thing. at the end of each function u put a sync function to sync the server/client