I don’t really know how to shorten it but
The script go through some lines then it suppose to hit this barrier that only opens again after all NPC humanoids are gone then continue through it
The code just kept randomly “true” “false” multiple times instead of doing its thing
local db = true
while db == true do
for i,v in pairs (game.Workspace:GetChildren()) do
if v:FindFirstChild("Humanoid") and not v:FindFirstChild("Plr") then
db = true
print("true")
else
db = false
print("false")
end
wait(1)
end
end
I tried script disabling and re-enabling but it just restart the script and looking for other forums but it didn’t do anything with humanoids
Here is my solution if other people came across this:
local db = true
while db == true do
for i,v in pairs (game.Workspace:GetChildren()) do
if not v:FindFirstChild("NPC") and v:FindFirstChild("Plr") and v:FindFirstChild("Humanoid") then
db = false
print("false")
else
print("true")
end
wait(1)
end
end