why are you even trying to save a module script in the first place?
what is the need behind this. (because there may be a way better way)
why are you even trying to save a module script in the first place?
what is the need behind this. (because there may be a way better way)
I need to put the entire script in there? And then save/load it?
If so, how do I load it in the script?
Memory, basically the ModuleScript acts as a memory for an AI.
The players can thus train their own AI and thus it needs to be saved.
why don’t you just save a table instead of saving a whole entire module script?
I don’t believe that much data can be stored in datastores.
i think that much data can be, dont forget datastores hold millions if not billions of keys and so much data
(heres an image a found)
(the key value was updated to: 4,194,304 per key)
basically you can do
data = datastore:getasync
loadstring(data)()
thats for loading
for saving idk how to do that ngl cuz i dont use loadstring and “…” brainrot so to save it
you need to get the string inside of the loadstring and save it
So a table with like billions of things can be stored with a data store? While there are also a lot of tables?
actually saving A WHOLE SCRIPT is wayyy more space taking
Oh, but I don’t think it’s efficient to store hundreds of millions of lines of data in a loadstring().
it isnt effiecent but i dont think theres like a way to make a script ingame rather than this and the fact when ur saving a script thats like 400 lines and say 50 letters per line thats like 20k bytes but tables are wayyy more effiecent since you can shorten thing in them and try to compress them unlike A WHOLE SCRIPT
maybe you need a database outside of roblox, that sounds like a good solution
Well, then I will try this untill maybe there will come a new thing.
Don’t know how to make one. Do I need hardware myself for that?
I’d like to comment about 1 thing- external databases would require servers and geeky stuff
May that help you:
Gotta buy a new 10k server then and leaving space for 1k electricity bill a month or soemthing lol.
I don’t think it’s possible to load the current content of a script into a loadstring. I haven’t found anything that works for it.
IKR ITS SOO ANNOYING- you can try my idea of like using multiple datastores at once and using compression methods such as words like hello turns into %1 when saving and when loading ur datastore it makes it into like the actual word another thing about the multiple datastores at once its like when loading ur datastores u combien them all into 1 table and when unsaving u spilt them again (and the facts this is alll free methods unlike servers and caring about crashing,bills,wifi soo many stuff)