Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Datastore for a model?

Hello, I am making a game where players build a custom vehicle out of lots of different blocks and models. I have the building part completed, however I need to be able to save the model they make in between games. I have not used datasaves much, but I know that they are used for storing values such as level or cash of a player. The only time I used them, they were starting to overload after auto saving every minute, with less than ten numbers stored in them. I was just wondering if it would be feasible to save an entire vehicle:

car1 = workspace.Model:Clone()
--then put the car as one of the values in the table (possibly with 3 or more save files)
sessionData[playerUserId] = {car1,car2,car3}

I was simply wondering if this would be possible or if it would overload the save.

Thanks

3 comments

0

You have to save how the car it put together e.g. the parts and positions ect. There is a character limit per key so you would be better off using keys just for the car save [player id]_car1, [player id]_car2 ...

0

 I was afraid of that.

0

makes roblox character death sound

1 answer

✓ Accepted answer

you could use a serializer to serialize the model and then save the model to a datastore, but that'd quickly fill the key character limit.

other games, such as bloxburg have pulled this off by, what I think they do is if the string gets longer than 260,000 characters, they split the string, and then save the other that gets left in another key.

2 comments

0

Thanks for the help, I will look into ways to serialize the model.

0

I guess all I need to store is the exact same data the client had to send to create the model in the first place, so I won't have to save every property

This discussion is preserved as it was. New answers, comments, and votes are closed.