I've tried alot and cant seem to get it to save. At line 9 it also says argument 1 missing or nil I'd also like to know why. The main point of what I'm trying to do is save a Table, so focus on that.
DS = game:GetService("DataStoreService"):GetDataStore('gearvaleuz')
http = game:GetService('HttpService')
--Loading Data
local function PlrAdd(player)
local GearDataLoad = game.ReplicatedStorage:WaitForChild('profile'):WaitForChild(player.Name):WaitForChild('GearData')
LD = http:JSONDecode(DS:GetAsync('GearColor'))
GearColorLoad = {
Color1 = Color3.fromRGB(LD['GClr'][1],LD['GClr'][2],LD['GClr'][3])
}
local Gear = workspace:WaitForChild(player.Name..'s Gear')
Gear:WaitForChild('GearColorValue').Value = GearColorLoad[1]
end
--Saving Data
game.Players.PlayerRemoving:connect(function(plr)
local GearDataSave = game.ReplicatedStorage:WaitForChild('profile'):WaitForChild(plr.Name):WaitForChild('GearData')
GearColorSave= httpJSONEncode({
['GClr'] = {
GearDataSave.GearColor.Value.r,
GearDataSave.GearColor.Value.g,
GearDataSave.GearColor.Value.b
}
})
DS:SetAsync('GearColor',GearColorSave)
end)
game.Players.PlayerAdded:connect(PlrAdd)
Thank you for taking your time to read this.

3 comments
That seemed to work, but saving it didnt..
@yyyyyy09 https://scriptinghelpers.org/questions/59669/how-can-i-encode-my-metatable-so-that-it-will-save is really what I want to know at this point
This should work instead of all the httpJSONEncoding stuff, It should save in this case, local GearColorSave = {["GClr"] = {script.Parent.Value.Value.r,script.Parent.Value.Value.g,script.Parent.Value.Value.b}}