Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to find a child in GetChildren()?

Asked by 3 years ago
01local l__LocalPlayer__2 = game.Players.LocalPlayer;
02local u3 = { "Robux", "Legendary"};
03local l__ReplicatedStorage__4 = game.ReplicatedStorage;
04function Delete()
05    local v1, v2, v3 = pairs(l__LocalPlayer__2:WaitForChild("Pets"):GetChildren());
06    while true do
07        local v4, v5 = v1(v2, v3);
08        if v4 then
09 
10        else
11            break;
12        end;
13        v3 = v4;
14        if not table.find(u3, v5:FindFirstChild("Rarity")) then

There is a String Value in every pet that contains the Rarity. I have to change this script because originaly it worked on name and it was

1if not table.find(u3, v5.Name) then

Then it takes the name of the folders of the pets and looks if its not in the local u3

but now I need to change it to rarity and I can't make it work like this because I can't check the value Rarity

So I basicly need to know how to find a child of this:

1local v1, v2, v3 = pairs(l__LocalPlayer__2:WaitForChild("Pets"):GetChildren());

and that child is rarity

0
is it FindFirstChild("Pets")? Mister33j 86 — 3y
2
lOl is this synapse decompiled code, cmon man, you know better greatneil80 2647 — 3y
0
this is a certified bruh moment Speedmask 661 — 3y
0
I wasnt asking what it is and idc what it is I just have to change the auto delete from agent pet system from pet name to rarity I can't choose what people add to their game im just someone that has to fix this jeboysisi 26 — 3y

Answer this question