Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

how do i make it find all the children that is on the table?

so i'm trying to make the script find all the children that is on the table and i ran out of ideas to make it work

local COLORz = {"Color8", "Color3", "Color2", "black", "Color1", "Color4", "Color3"}

if game.Players.LocalPlayer.Character:FindFirstChild("Color") and game.Players.LocalPlayer.Character.Color:FindFirstChild(COLORz) then
print("YEET")
end

1 answer

✓ Accepted answer

Use a for loop to go through a table

local COLORz = {"Color8", "Color3", "Color2", "black", "Color1", "Color4", "Color3"}
local char = game.Players.LocalPlayer.Character

if char:FindFirstChild("Color") then
for _, v in pairs(COLORz) do
if char.Color:FindFirstChild(v) then
print("yeet")
end
end
end

This discussion is preserved as it was. New answers, comments, and votes are closed.