DatastoreService for Parts

DatastoreService for Parts


Hey Developers,

I’m here because I have a small issue. I have a game here in front of me where you place and break objects on a map. How do I save those changes the next time the player visits?
Broken objects don’t respawn, and placed items are intended to stay.

I’ve never used DatastoreService before, and I was wondering if you could datastore the map entirely.

(P.S. Its a single player game)

1 Like

You can save models directly to Datastore, so you can (before the player leaves) save the whole map to the datastore and when the player rejoins, it will call back the model from the DataStore. More information on how DataStore works is here (Data Stores | Documentation - Roblox Creator Hub)

Hope this helps!

2 Likes

Real shit? You can actually do that??

1 Like

Yeah i didn’t know you could do it either :sweat_smile:

1 Like

wait just models or folders as well

1 Like

I think it’s only models, to save folders you need to save it all to a table anyway, it’s counterintuitive.

1 Like

Oh ok, thanks though. Your a real life saver

1 Like

its not really working, sooooo idk what to do now

Screenshot 2024-06-19 at 9.03.20 AM
I got an error saying I cant store an array

1 Like

In the devforum topic i posted, they’re taking the individual model data and saving it to a table. The table is able to be stored and recalled by the datastoreservice, and that’s why it works. The topic has individual snippets of code that you can put together.

1 Like

soooooo i cant store models…?
what do i do now

1 Like

wait fr we can say bad words on devfourm?

1 Like