of     1   

darmantinjr
#223897150Saturday, August 19, 2017 1:17 AM GMT

Seeing as how my last friend wasn't getting anwsers here is my repost. Why does this only work once and evry tims you go back into the room the script automatically thinks there all dead local trapdoors = game.Workspace.Trapdoors while wait(1) do local deadZombies = {} for i, v in pairs(script.Parent:GetChildren())do if v:FindFirstChild'Zombie' and v.Zombie.Health == 0 then table.insert(deadZombies,v) end end if #deadZombies == #script.Parent:GetChildren() - 1 then _G.playerinbattle = {} trapdoors.lockteleportdestination.Exit.exitscript.Disabled = false trapdoors.lockteleportdestination.Exit.Material = "Neon" trapdoors.lockteleportdestination.Exit.BrickColor = BrickColor.new("Dark stone grey") trapdoors.lockteleportdestination.Exit.ParticleEmitter.Enabled = true trapdoors.Lockteleport.TrapLight.SpotLight.Enabled = false print('All Dead') end end
darmantinjr
#223897643Saturday, August 19, 2017 1:28 AM GMT

Bumpidedump
Alend43
#223897973Saturday, August 19, 2017 1:35 AM GMT

put it in this loop while true do wait() end YOU MUST PUT THE WAIT and just in case put a 0.01 or something
darmantinjr
#223898181Saturday, August 19, 2017 1:38 AM GMT

lol i know what a while loop is. And i know you need to wait. i have been around for a while. I am not new to LUA.
Alend43
#223898201Saturday, August 19, 2017 1:39 AM GMT

Then whats the problem here, add the while loop
darmantinjr
#223898263Saturday, August 19, 2017 1:40 AM GMT

And i don't know if you noticed but there is clearly a while loop in this script...

    of     1