Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do i Data Save a model?

Asked by
Neu_Dev 22
4 years ago

What's the workaround saving a model? for instance a car that has properties in it like color, size and when i spawn i can access the car again and spawn it in the game?

1 answer

Log in to vote
-1
Answered by 4 years ago
Edited 4 years ago

Put all the properties data in a table like

carData = {Color = "Red", Size = 20} -- example

and then save the datas with data store service

Put the base of the car with default properties on ReplicatedStorage or something

so when you load the game just load the data, clone the car into workspace, and apply the properties from the loaded table

Edit : Missing words -You need JSON service which convert table to string and vice versa to save table with data store btw

0
-1 for saying "You need JSON service which convert table to string and vice versa to save table with data store btw". You do NOT need to encode, Roblox actually already does this, so you're overengineering/reinventing the wheel. Also, that service is HttpService. programmerHere 371 — 4y
Ad

Answer this question