|
| 19 Jun 2016 03:32 PM |
I want to make a sandbox game, each player has their own designated plot where they can build stuff in. Is it possible to DATASTORE the actual plot and the stuff inside is all parented to the plot. So when the player leaves, the stuff saves and when the player comes back, the stuff is exactly where it is.
Please provide roblox wiki pages if this is possible. |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2016 03:34 PM |
| Well, I guess you could data save positions, rotations and any type of visual modification to the blocks. SO yes, I would say it is possible. You would need to load the bricks back in though. |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2016 03:38 PM |
| Yeah, that's very time consuming and I'm up for it but I was just curious if there was another way @TacticalKiller91 |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
| |
|
|
| 19 Jun 2016 07:43 PM |
| what I don't want to use DataPersistence |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2016 07:49 PM |
| Okay, so I want to save models with Datastore btw |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2016 07:50 PM |
You need to save and interpret a string. Save all the variations between the user's part and a fresh instance thereof, then load it back up. It's actually easier to load than save because:
Setting a property is as simple as indexing a table
Property = "BrickColor" Value = "Really red" p = Instance.new("Part") p[Property] = BrickColor.new(Value)
But getting it takes the whole API
Properties = {--[[ A dump of all the API's objects and their properties, methods, and functions ]]} ComparePart = Instance.new("Part") for prop in Properties do if p[prop] ~= ComparePart[prop] then --Save it end
And then you have to pcall everything because it doesn't like when said properties don't exist. |
|
|
| Report Abuse |
|
|
Lem0nzzx
|
  |
| Joined: 08 Feb 2016 |
| Total Posts: 1604 |
|
|
| 19 Jun 2016 07:51 PM |
| ^ You just save the properties. |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2016 07:51 PM |
https://forum.roblox.com/Forum/ShowPost.aspx?PostID=184750925 That's what I did for one of my games. It works. |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2016 07:52 PM |
| Thanks for the reply Phoenix! However I am trying to save multiple models within the plot. It is sort of like Miners Haven. I am not sure what you said would work with models. |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2016 07:55 PM |
Yeah it will as long as you record parents. Now that's actually kinda tricky. But the gist of it is that you need to start with parent "0", which we'll say is workspace. Then you can generate parts and put them in a table like this:
Loopback = {['0'] = game.Workspace}
And generated parts can be given their own parental code and put within the objects in the table during interpretation. |
|
|
| Report Abuse |
|
|