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

DataStore with Parts/Models?

Asked by
iFlusters 355 Moderation Voter
8 years ago

I know how to create a DataStore etc, but I am not so sure how to do this with parts, I've seen in a few games that it is possible such as Sandbox. A basic outline would be nice.

2 answers

Log in to vote
1
Answered by 8 years ago

This is possible with the Data Persistence system, but not with the DataStore system. You can use the Data Persistence system for this. However, this system is deprecated, and you should not use it for new work. In addition, this sytem is heavily limited as to how much memory you can store in it.

A tutorial for using it can be found here.

Ad
Log in to vote
1
Answered by 8 years ago

Short Answer: No, you can't save parts with Data Storage.

Long Answer: Ok, so Data Storage is basically a long list which has 2 parts in it... Keys and Values the Key must be a String and it must be unique to the Player since the Key is used to access the Value and the Value is what you are trying to save.... Values can ONLY FOR NOW BE: boolean, strings, Lua tables and numbers. There are different ways people save the "Parts" such as..... if you use a function with a PlayerAdded event in the ServerScriptService you could make an if statement saying

--example, it won't work it's just showing you what you could do with values truly.
if player.Value.String == "Sword" then
local sword = script.Tool
sword.Parent = player.Backpack
end
0
I've played a game called 'Sandbox' a few years ago, and I remember you could save/load your builds and the blocks would be in the exact place that they where before, how come you say No to this? iFlusters 355 — 8y
0
Because Sandbox uses Data Persistence, the older version of Data Stores. Spongocardo 1991 — 8y

Answer this question