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

How do you use datastore for parts.?

Please give me an example like if you where to customize a car and u want to save it for when you rejoin.

2 answers

✓ Accepted answer

-- Define Datastore

local PlayerCars = {}

Datastore = 

game["Players"].PlayerRemoving:connect(function(Player)
	Datastore:SetAsync(Player.userId,unpack(PlayerCars))
end)

1 comment

0

Thanks for the example...i learned off this.

I'd say go to data persistence if you want the easier method for that.

http://wiki.roblox.com/index.php?title=Data_store

*Unlike Data Persistance, Data Stores cannot save ROBLOX instances directly. For example, calling DataStore:SetAsync("key", Instance.new("Part")) will throw an error. You should write a function that converts the instance to a table or string. *

So for what you would do for datastores, is make each part of the car converted into a string(So you'll have to make a script that reads that string and creates the brick for X car).

2 comments

0

Can you give me an example.

0

Chris, this is not a request site.

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