How Can I Save A Full Model?

Hey there everyone, I’ve been trying to make a Script which basically saves and loads a full model into a folder that’s inside the Player once he joins back into the game, but it keeps giving me errors.

I’ve tried multiple times to fix it, I even tried asking for help to ChatGPT, but no luck, I’ve been trying this for over 2-3 days now…So I’m making this Post to ask for help.

If it’s not asking too much, could anyone help me with the Script, or just make a brand new one?

I’m really tired of trying this Script multiple times…Thank you for reading, and for your patience.

what does the model contain? btw you could serialize each object into a lua table and save that via a datastore

The Model contains quite alot of things, such as parts, folders, values, configuration…

Oh also, I’ve already tried that pretty sure, but nothing loads into the folder once I join into the game.

was there any problems getting or saving the data to a datastore?

Well, I guess so…There was a few errors with the Script, but once I fixed them, there wasn’t any other errors nor warnings, but nothing loaded into the folder like I said…And I don’t even know if the Model itself saved or not.

I’d try to debug and narrow down the problem on what the actual issue is, you can check the datastore key by just going into the command line and typing

print(game:GetService("DataStoreService"):GetDataStore(Datastorename):GetAsync(Key))

(replace “Datastorename” and “Key” with your designated names)
See what prints in output. if the data saved, then your issue is more to deal with getting the data back into form than saving it.

1 Like

Alright, do I put that on the saving function or?

Instances, such as models or parts can’t be saved in datastores, if that’s what you’ve tried to do.

Have you attempted to save the properties of the parts into a table? Then when loading the data in, you could create new parts and set everything up. Also, there are free modules (to my knowledge) to convert parts or models into savable tables which could assist you on this.

I think I have tried that…

And, where could I find one of those Modules? I could try em out.

InstanceStore (Instance to Datastore) – here is one I found with a quick search. I’ve never personally used it so I can’t comment on it’s reliability but it should put you on the right track.

Regardless of what you try instances can’t be saved due to datastore limitations so I’d recommend something like this.

1 Like

Alright, Thanks!! I’ll try it out.

1 Like