#Hello i have made a pet system like 4 months ago.. and now its broken and idk what i need to do with
25 messages · Page 1 of 1 (latest)
There is it
if u want to
function PetIDHandler.GetPets()
local DS = game:GetService('DataStoreService')
local Pets = DS:GetDataStore('Pets')
local pets = nil
local success, err = pcall(function()
print(Pets:GetAsync("AllPets", "Pets"))
--pets = Pets:GetAsync("AllPets", "pets")
end)
if not success then warn(err) return end
if not pets then
pets = {}
end
return pets
end```
it was working in last 4 months
but now nope..
Well is "all pets" a valid key?
he should
Also, GetAsync only accepts one parameter, yet you're sending two for some reason
I would recommend you read about datastore's and understand how they work before using them
i know how its works.. but i returned in like 4 months and iam lost again .. :D
** You are now Level 11! **
Robloxs documentation or a YouTube video always helps
What are you saving pets to? The players userid or something else?
mby my friend try to play with my code so idk.. but yes "AllPets" without another argument
i have all pets storage
with
pet name, pet id, pet owner id, enchantments
etc..
do basically Pet = {
"pet id": 45646456,
....
} //in python iam lost in lua again :D
prob my friend trying to change it :D
he aslo changed this