#pet adding

57 messages · Page 1 of 1 (latest)

grand river
#

Hey, so currently my pet system was working fine then fifty things broke when I wanted to add something. This is one of the problems currenty occuring. Im firing senddata which is a remote event and when it picks up it should add to frame all the pets and someone even helped me for it to "work" but with no avail. If you guys could help me it would be greatly appriciated heres the code- lua game.ReplicatedStorage.SendData.OnClientEvent:Connect(function(petNames) print("Picked up on the client") for i, petName in pairs(petNames) do local eggName = eggrarites[petName] if game.ReplicatedStorage.Pets:FindFirstChild(eggName) then for _, pet in pairs(game.ReplicatedStorage.Pets[eggName]:GetChildren()) do if pet.Name == petName then addToFrame(game.ReplicatedStorage.Pets:FindFirstChild(eggName):WaitForChild(petName)) break end end end end end)

grand river
#

if anyone can help it be greatly appriciated

grand river
#

someone i need help lmfao

stray marsh
#

hmm ok ok

dusk flameBOT
#

studio** You are now Level 7! **studio

stray marsh
#

i kinda need more details about the system you are working on inorder to help you

#

please explain in simple terms

grand river
#

Ok

#

So

#

It’s not adding the pets that have duplicates in my inv

#

It only adds one of each one I have @stray marsh

grand river
#

something else is wrong with my system but this is my main priority atm

#

cus its been an issue for so long

#

oop fixed the first part

#

its not fixed but kinda

#

wtver

grand river
#

ok im just gonna work on the bigger problem rn

#
local ReplicatedStorage = game:GetService("ReplicatedStorage") or require(game.ReplicatedStorage)
local commonEgg = game:GetService("ReplicatedStorage"):WaitForChild("Pets"):FindFirstChild("CommonEgg") or require(game.ReplicatedStorage.Pets.CommonEgg)
local Pets = ReplicatedStorage.Pets

local Rarities = {}
local diamondPets = {}
local Pets = {
    
    CommonEgg = {
        ["Secret"] = {
            commonEgg:FindFirstChild("Big bear")
        };
        ["Epic"] = {
            commonEgg:FindFirstChild("Turkey")
        };
        ["Rare"] = {
            commonEgg:FindFirstChild("Koala")
        };
        ["Uncommon"] = {
            commonEgg:FindFirstChild("Fox")
        };
        ["Common"] = {
            commonEgg:FindFirstChild("Bear")
        }
    }


}```
#

thi

#

this*

#

only koala actly "results" in something according to the choose function under but i can ss the path if you need

grand river
#

sir

#

i need you

stray marsh
#

yessir

#

getting some helpp for you

#

just a sec

stray marsh
#

your script seems fine

#

as hell

grand river
#

i fixed it

stray marsh
#

what was the issue imao

grand river
#

huh

#

oh i forget

#

oh yeah

#

i kept deleting the values

#

thats why

#

when i joined

#

when i added it into my frame

#

into my inv

#

i cloned it with no parent

#

so it got deleted

stray marsh
#

ok ok

grand river
#

i fixed that bu theres another problem

stray marsh
#

nice

grand river
#

with choosing pets

#

something dumb

stray marsh
#

choosing pets?

#

what do you mean by that dude

#

like if a player has more than two pets he can choose either of those

grand river
#

no

#

choosing pets

#

a function

#

it chooses the pet

#

theres a new fourm

#

ive made like fifty

#

its new

#

farily new