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
local l__LocalPlayer__2 = game.Players.LocalPlayer;
local u3 = { "Robux", "Legendary"};
local l__ReplicatedStorage__4 = game.ReplicatedStorage;
function Delete()
    local v1, v2, v3 = pairs(l__LocalPlayer__2:WaitForChild("Pets"):GetChildren());
    while true do
        local v4, v5 = v1(v2, v3);
        if v4 then

        else
            break;
        end;
        v3 = v4;
        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

if 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:

local 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