hello. I’ve been trying to save a pet folder with this script:
local datastore = game:GetService("DataStoreService")
local miranura = datastore:GetDataStore("MiRanura")
game.Players.PlayerAdded:Connect(function(player)
local carpeta = player:WaitForChild("mascotas")
local userid = player.UserId
local mascotasList = {}
for i , mascotas in pairs(player.mascotas:GetChildren()) do
table.insert(mascotasList)
local guardar = miranura:SetAsync(player.UserId .. "mascotasguardadas", mascotasList)
local mascotasguardadas = miranura:GetAsync(player.UserId .. "mascotasguardadas") or {}
for i, character in pairs(mascotasguardadas) do
if game.ReplicatedStorage:WaitForChild("Mascotas"):FindFirstChild(character) then
game.ReplicatedStorage.CharactersFolder[character]:Clone().Parent = carpeta
end
end
end
end)
if anyone knows how to help me thank you very much