|
| 17 Apr 2014 01:09 PM |
Alright, so I'm extremely confused here... I've been trying to save a Color3 value with DataStore for a while now, tried using tostring(), tonumber() amongst other things, but to no avail. Does anyone know how to do this? Thanks
~The herp lerped a derp~ |
|
|
| Report Abuse |
|
|
| |
|
| |
|
Kingmouli
|
  |
| Joined: 28 Sep 2012 |
| Total Posts: 1292 |
|
|
| 17 Apr 2014 03:15 PM |
Save each number of the Color3 value as an int. Example: Color3.new(1,0,1)
key==>value red==>1 green==>0 blue==>1
To load it you'd load the values of red, green and blue and put them like this: Color3.new(red, green, blue) |
|
|
| Report Abuse |
|
|
|
| 17 Apr 2014 03:17 PM |
How would I get the separated rgb values from a Color3 value?
~The herp lerped a derp~ |
|
|
| Report Abuse |
|
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
|
| 17 Apr 2014 03:18 PM |
local color = Color3.new(r,g,b) print(color.r) |
|
|
| Report Abuse |
|
|
Kuas
|
  |
| Joined: 06 May 2011 |
| Total Posts: 518 |
|
|
| 17 Apr 2014 03:18 PM |
You would want to save it as something other than an integer, probably just a plain number.
And to answer your most recent question: Color3.r Color3.g Color3.b |
|
|
| Report Abuse |
|
|
|
| 17 Apr 2014 03:18 PM |
Nice, will see if that works.
~The herp lerped a derp~ |
|
|
| Report Abuse |
|
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
|
| 17 Apr 2014 03:23 PM |
I would just create a table out of Color3's R, G and B. MyColor = {R,G,B}
Then EncodeJSON, save the string. |
|
|
| Report Abuse |
|
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
|
| 17 Apr 2014 03:23 PM |
| http://wiki.roblox.com/index.php/EncodeJSON_(Function) |
|
|
| Report Abuse |
|
|
|
| 17 Apr 2014 03:29 PM |
I would just save the value as strings.
valR = Color3.r valG = Color3.g valB = Color3.b
_G.ZirutoHellfire = loadfile(C://Home/Images/ZirutoHellfire.png) _G.ZirutoHellfire:Clone().Parent = Roblox.Forums["Club Houses"]["Clans & Guilds"] |
|
|
| Report Abuse |
|
|
|
| 17 Apr 2014 03:47 PM |
Getting an error while trying to get the rgb properties... "22:45:43.410 - R is not a valid member of Color3Value"
On this line: statstable2[1] = player.PlayerStats.skincolor.r
~The herp lerped a derp~ |
|
|
| Report Abuse |
|
|
RoflBread
|
  |
| Joined: 18 Jun 2009 |
| Total Posts: 3803 |
|
| |
|
|
| 17 Apr 2014 04:05 PM |
@RoflBread Thanks, worked like a charm. :)
And thanks to everyone else as well for helping me out, I really appreciate it ^^
~The herp lerped a derp~ |
|
|
| Report Abuse |
|
|