local rep = game.ReplicatedStorage local zombies = game.Workspace.Zombies:GetChildren() rep.Died.OnServerEvent:Connect(function(player) for i = 1, #zombies do zombies[i]:Destroy() game.Workspace.Spawns.Script.Disabled = true end end) rep.resurrect.OnServerEvent:Connect(function(player) game.Workspace.Spawns.Script.Disabled = false end)
local rep = game.ReplicatedStorage local zombies = game.Workspace.Zombies:GetChildren() rep.Died.OnServerEvent:Connect(function(player) for _, zombiezz in pairs(zombies) do zombiezz:Destroy() end game.Workspace.Spawns.Script.Disabled = true end) rep.resurrect.OnServerEvent:Connect(function(player) game.Workspace.Spawns.Script.Disabled = false end)
local rep = game.ReplicatedStorage local zombies = game.Workspace.Zombies rep.Died.OnServerEvent:Connect(function(player) zombies:ClearAllChildren() game.Workspace.Spawns.Script.Disabled = true end) rep.resurrect.OnServerEvent:Connect(function(player) game.Workspace.Spawns.Script.Disabled = false end)
This works, thank you all for your help