Hi guys.
So I wrote this script in the hopes of detecting if a user already has the tools in his backpack, and if he/she doesn't, the script automatically adds the missing tools to their backpack.
This was my approach:
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function()
for i,v in pairs (script:FindFirstChild("tools"):GetChildren()) do
if plr:GetRankInGroup(groupID) >= 3 then
while wait(1) do
if plr.Backpack:FindFirstChild(v.Name) then
else
v.Parent = plr.Backpack
end
end
end
end
end)
end)
It gives me the first tool in the folder (most likely because I used FindFirstChild on like 6), but I know no other way to get the tools. Any other ways for me to approach this?
I want to check if the user has ALL tools in the folder, not just one. And if he has 1 but misses 2, it only gives 2.

3 comments
You're missing a few end) with closing brackets.
Oops, you're right. Glad you always have my back ;)
Thanks for this well-explained answer! Glad to know I was so close :)