--Data
local DSS = game:GetService("DataStoreService")
local AppearanceS = DSS:GetDataStore("Appearance")
local ClassS = DSS:GetDataStore("Class")
--Values
local Hair = script.Parent.Parent.Appearance.HairValue
local HairC = script.Parent.Parent.Appearance.HairColorValue
local Skin = script.Parent.Parent.Appearance.SkinColorValue
local Name = script.Parent.Parent.TextBox.CName.Value
local Class = script.Parent.Parent.Class_Selection.Class
script.Parent.MouseButton1Click:Connect(function(plr)
local suc, err = pcall(function()
local Appearance = {Hair.Value, HairC.Value, Skin.Value, Name.Value}
AppearanceS:SetAsync(plr.UserId, Appearance)
ClassS:SetAsync(plr.UserId, Class.Value)
end)
if suc then
print("Saved!")
else
print("Failed!")
end
end)
I'm trying to save an appearance for the character, but the problem is, it says it failed to save it in the print. I have no visible errors, and I'm new to table saving. What could be the problem?
