Hello
I Am Making A Custom Character Save System And I Get This Error
SetAsync is not a valid member of IntValue
Here is the code (Shortened, full version is not complete)
local CCDS1 = game:GetService("DataStoreService")
local Saveslot1 = CCDS1:GetDataStore("CCData1")
game.Players.PlayerAdded:connect(function(player)
local slot1 = Instance.new("Folder",player)
slot1.Name = "CustomCharacterSlotOne"
local skincolorG = Instance.new("IntValue",slot1)
skincolorG.Name = "SkinColorGREEN"
skincolorG.Value = Saveslot1:GetAsync(player.UserId) or 0
skincolorG:SetAsync(player.UserId, skincolorG.Value)
skincolorG.Changed:connect(function()
Saveslot1:SetAsync(player.UserId, skincolorG.Value)
print("skincolorG saved !")
end)
end)
Can You Tell Me Why Is This Not Working ?
Edit : Solved ! Thanks mattscy :)

3 comments
Try using Saveslot1:SetAsync instead of skincolorG:SetAsync on line 10
Are u trying to save skincolorG?
You can save a object you can only save values. so use Saveslot1:SetAsync(player.UserId, skincolorG.Value) at line 10 instead.