Hi, I am using Datastore2 to save my data and I was just wondering if it is possible to save a Color3Value as a Color3, instead of splitting it up into Color3.R , Color3.G and Color3.B?
My current Datastore script:
Players.PlayerAdded:Connect(function(player)
--TODO: Clean this up..
local FOVData = DataStore2("FOV" , player)
local DayData = DataStore2("Time" , player)
local BrightnessData = DataStore2("Brightness" , player)
local WeatherData = DataStore2("Weather" , player)
local HoursData = DataStore2("Hours" , player)
local PitchColorData = DataStore2("PitchColor" , player)
local AngleBarData = DataStore2("AngleBar" , player)
local PitchTextureData = DataStore2("PitchTexture" , player)
local TexturesData = DataStore2("Textures" , player)
local SoundtrackData = DataStore2("Soundtrack" , player)
local CooldownData = DataStore2("Cooldown" , player)
local BallHoldData = DataStore2("Ball_Hold" , player)
local MotionBlurData = DataStore2("MotionBlur" , player)
local GK_TypeData = DataStore2("GK_Type" , player)
local Folder = Instance.new("Folder")
Folder.Name = "Settings"
Folder.Parent = player
local FOV = Instance.new("IntValue")
FOV.Name = "FOV"
FOV.Value = FOVData:Get(70)
FOV.Parent = Folder
local TimeOfDay = Instance.new("IntValue")
TimeOfDay.Name = "Time"
TimeOfDay.Value = DayData:Get(12)
TimeOfDay.Parent = Folder
local Brightness = Instance.new("IntValue")
Brightness.Name = "Brightness"
Brightness.Value = BrightnessData:Get(0)
Brightness.Parent = Folder
local Weather = Instance.new("StringValue")
Weather.Name = "Weather"
Weather.Value = WeatherData:Get("Clear")
Weather.Parent = Folder
local BallHold = Instance.new("StringValue")
BallHold.Name = "Ball_Hold"
BallHold.Value = BallHoldData:Get("Default")
BallHold.Parent = Folder
local Hours = Instance.new("IntValue")
Hours.Name = "Hours"
Hours.Value = HoursData:Get(0)
Hours.Parent = Folder
local Cooldown = Instance.new("IntValue")
Cooldown.Name = "Cooldown"
Cooldown.Value = CooldownData:Get(0.075)
Cooldown.Parent = Folder
local PitchColor = Instance.new("Color3Value")
PitchColor.Name = "PitchColor"
PitchColor.Value = PitchColorData:Get(Color3.new(.121569, 0.501961, 0.113725))
PitchColor.Parent = Folder
local AngleBar = Instance.new("BoolValue")
AngleBar.Name = "AngleBar"
AngleBar.Value = AngleBarData:Get(false)
AngleBar.Parent = Folder
local PitchTexture = Instance.new("BoolValue")
PitchTexture.Name = "PitchTexture"
PitchTexture.Value = PitchTextureData:Get(true)
PitchTexture.Parent = Folder
local Textures = Instance.new("BoolValue")
Textures.Name = "Textures"
Textures.Value = TexturesData:Get(true)
Textures.Parent = Folder
local Soundtrack = Instance.new("BoolValue")
Soundtrack.Name = "Soundtrack"
Soundtrack.Value = SoundtrackData:Get(true)
Soundtrack.Parent = Folder
local GK_Type = Instance.new("BoolValue")
GK_Type.Name = "GK_Type"
GK_Type.Value = GK_TypeData:Get(true)
GK_Type.Parent = Folder
local MotionBlur = Instance.new("BoolValue")
MotionBlur.Name = "MotionBlur"
MotionBlur.Value = MotionBlurData:Get(false)
MotionBlur.Parent = Folder
for _, v in pairs(Folder:GetChildren()) do
local Datastore = DataStore2(v.Name , player)
Datastore:OnUpdate(function(NewValue)
--if not v:IsA("Color3Value") then
v.Value = NewValue
--end
end)
v:GetPropertyChangedSignal("Value"):Connect(function(NewValue)
Datastore:Set(NewValue)
end)
end
task.spawn(function()
while task.wait(1) do
Hours.Value +=1
end
end)
end)
Any help would be appriciated, thanks!