Bike Color Saving Data NOT working

ServerScriptService.BikeData:12: invalid argument #3 (Color3 expected, got number)

local players = game:GetService("Players")
local datastore = game:GetService("DataStoreService")
local ColorOneDataStore = datastore:GetDataStore("ColorOneDataStore")

game.Players.PlayerAdded:connect(function(player)
	local leaderstats = Instance.new("Folder")
	leaderstats.Name = "BikeData"
	leaderstats.Parent = player
	
	local ColorOne = Instance.new("Color3Value", leaderstats)
	ColorOne.Name = "ColorOne"
	ColorOne.Value = ColorOneDataStore:GetAsync(player.UserId) or 0
	ColorOneDataStore:SetAsync(player.UserId, ColorOne.Value)

	ColorOne.Changed:connect(function()
		ColorOneDataStore:SetAsync(player.UserId, ColorOne.Value)
	end)

end)
1 Like

You can’t save Color3’s in a DataStore. This question has also been answered before, here’s the top result I found from a quick search on Google.