I wanna save clothes but I don’t know how because I would have to save the shirt template
The error is 103: string is not allowed for datastores.
Code (sorry that its really messy I’ve never used datastores before)
remote = game.ReplicatedStorage.SaveAvatar
dss = game:GetService("DataStoreService")
avatarStore = dss:GetOrderedDataStore("avatarStore")
debounce = false
function TeleportAndSave(player,Clothes)
local button = player.PlayerGui.CharacterCustomization.Frame.Confirm
if debounce == false then
button.Text = ("Loading..")
debounce = true
print(player.Name..("'s data is.. "),Clothes)
for ClothesNumber,ClothesItem in pairs(Clothes) do
local success, errorMessage = pcall(function()
avatarStore:SetAsync(player.UserId,Clothes[ClothesNumber])
print(avatarStore:GetSortedAsync(player.UserId))
end)
if not success then
warn(("Error.. ")..tostring(errorMessage))
button.Text = ("Error, try again")
task.wait(3)
debounce = false
button.Text = ("Confirm")
break
end
end
elseif debounce == true then
warn("Debounce!")
end
end
remote.OnServerEvent:Connect(TeleportAndSave)