Battle_NPC = script.Parent; Respawned_Battle_NPC = Battle_NPC:Clone();
while true do
wait(1);
Battle_NPC_Humanoid = Battle_NPC:FindFirstChild("Humanoid");
if Battle_NPC_Humanoid ~= nil then
Joints = {
Battle_NPC_RightArm = Battle_NPC:FindFirstChild("Right Arm");
Battle_NPC_LeftArm = Battle_NPC:FindFirstChild("Left Arm");
Battle_NPC_RightLeg = Battle_NPC:FindFirstChild("Right Leg");
Battle_NPC_LeftLeg = Battle_NPC:FindFirstChild("Left Leg");
}
local Continue = true;
for i, v in pairs(Joints) do
if v == nil then
Continue = false;
end
end
end
end
I know, there is a more simple way to do this, but I want to see if this is possible. I'm trying to get the things in the Table and Destroy them with the :Destroy method. My friend gave me the in pairs loop and I don't know what to do next.
"Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program." - Linus Torvalds
