can someone fix this for me? what i want it to be like is check if in game.Workspace.Map.Enemy if there is a model named "EvilDefense" check the amount of the model if there is more then 1 model in the folder "Enemy" set one of the model's humanoid.health to 0, the script is in the model.
local children = game.Workspace.Map.Enemy.EvilDefense:GetChildren()
local count = #children
local BossCount = 0
for Index, Object in next, children do
if (Object:IsA("Model") and (Object.Name == "EvilDefense")) then
BossCount = (BossCount + 1)
if BossCount ~= 1 then
script.Parent.Humanoid.Health = 0
end
print(BossCount)
end
end

1 comment
man why I cant log in roblox lol