davisky2
|
  |
| Joined: 04 Mar 2012 |
| Total Posts: 4710 |
|
|
| 07 Mar 2015 03:34 PM |
| Uh, i know how to save things. But by thinking logically i dont know how to save an instance. For example you have a model in your game with lots of parts in it, but how do you save it? Can anyone give me an example code? |
|
|
| Report Abuse |
|
|
KAAK82
|
  |
| Joined: 06 May 2014 |
| Total Posts: 1166 |
|
|
| 07 Mar 2015 03:35 PM |
I can't remember but I think it was like Player:SaveInstance(Instance) |
|
|
| Report Abuse |
|
|
| |
|
davisky2
|
  |
| Joined: 04 Mar 2012 |
| Total Posts: 4710 |
|
|
| 07 Mar 2015 03:36 PM |
@KAAK
I know hwo to save stuff, but i need an example code how do you do it logically. |
|
|
| Report Abuse |
|
|
davisky2
|
  |
| Joined: 04 Mar 2012 |
| Total Posts: 4710 |
|
|
| 07 Mar 2015 03:37 PM |
| Oh wait, i got it. Thanks anyways. |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2015 03:37 PM |
no, you don't use SaveInstance() it's 2015, data persistence is dead.
you use stravant's module |
|
|
| Report Abuse |
|
|
davisky2
|
  |
| Joined: 04 Mar 2012 |
| Total Posts: 4710 |
|
|
| 07 Mar 2015 03:40 PM |
| Can i save instances with JSON code also? |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2015 03:40 PM |
encode instance module by stravantttt
look it upppp |
|
|
| Report Abuse |
|
|
davisky2
|
  |
| Joined: 04 Mar 2012 |
| Total Posts: 4710 |
|
|
| 07 Mar 2015 03:41 PM |
@Chief
Where should i search it? |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2015 03:42 PM |
| http://www.roblox.com/EncodeInstance-Module-Does-not-work-with-CSG-item?id=176696010 |
|
|
| Report Abuse |
|
|
davisky2
|
  |
| Joined: 04 Mar 2012 |
| Total Posts: 4710 |
|
|
| 07 Mar 2015 03:47 PM |
| Uhh, i still dont get it how to use that script or how to use it as an example. |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2015 03:48 PM |
it's a modulescript
learn how to use modulescripts |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2015 03:51 PM |
wow stravant never disappoints |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2015 03:58 PM |
| You should make your own function for this, it helps you understand it better. |
|
|
| Report Abuse |
|
|
davisky2
|
  |
| Joined: 04 Mar 2012 |
| Total Posts: 4710 |
|
|
| 07 Mar 2015 04:03 PM |
| But can JSON save Instances? |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2015 04:06 PM |
I think his coverts the instance and its properties into a table then encodes it into JSON.
So it has maybe a table of properties, loops through the instance using a pcall maybe,and if succesful it adds the properties name and its value to a table. Then the decode uses that to make it back into the instance and with the same values of its properties.
|
|
|
| Report Abuse |
|
|