Theres a IntValue In Workspace Causing Me Creating a Value Of "ZombiesLeft" How Do I Make it Minus A Zombie After Health 0?
This Scripting Doesen't Seem To Work.
local message = Instance.new("Message")
while true do
rounds = Instance.new("IntValue")
rounds.Parent = game.Workspace
rounds.Name = "Rounds"
rounds.Value = 0
zombies = Instance.new("IntValue")
zombies.Parent = game.Workspace
zombies.Name = "ZombiesLeft"
zombies.Value = 0
next = Instance.new("IntValue")
next.Parent = game.Workspace
next.Name = "Next"
next.Value = 0
--Round 1 -- 2 Sets
message.Parent = game.Workspace
message.Text = "Round 1"
rounds.Value = 1
wait(1)
message:remove()
--Set 1
game.Workspace.ZombiesLeft.Value = game.Workspace.ZombiesLeft.Value+1
a = game.Lighting.ZombieA:clone()
a.Parent = game.Workspace
a:makeJoints()
wait(10)
--Set 2
game.Workspace.ZombiesLeft.Value = game.Workspace.ZombiesLeft.Value+1
a = game.Lighting.ZombieA:clone()
a.Parent = game.Workspace
a:makeJoints()
wait(10)
--Finishing Sets
next.Value = 1
--Ending Round
if next.Value==1 then
next.Value = 0
message.Parent = game.Workspace
message.Text = "Round 2"
rounds.Value = 2
wait(1)
message:remove()
--Set 1
game.Workspace.ZombiesLeft.Value = game.Workspace.ZombiesLeft.Value+1
a = game.Lighting.ZombieA:clone()
a.Parent = game.Workspace
a:makeJoints()
wait(10)
--Set 2
game.Workspace.ZombiesLeft.Value = game.Workspace.ZombiesLeft.Value+1
a = game.Lighting.ZombieA:clone()
a.Parent = game.Workspace
a:makeJoints()
wait(10)
--Set 3
game.Workspace.ZombiesLeft.Value = game.Workspace.ZombiesLeft.Value+1
a = game.Lighting.ZombieA:clone()
a.Parent = game.Workspace
a:makeJoints()
wait(10)
--Finishing Sets
next.Value = 1
--Ending Round
if next.Value==1 then
next.Value = 0
game.Workspace.Rounds:remove()
game.Workspace.ZombiesLeft:remove()
game.Workspace.Next:remove()
message.Parent = game.Workspace
message.Text = "You Survived!"
wait(2)
message:remove()
end
end
end
Other Part Inside MainGame Script
local hint = Instance.new("Hint")
hint.Parent = game.Workspace
while true do
hint.Text = "Round: "..game.Workspace.Rounds.Value.."/ Zombies: "..game.Workspace.ZombiesLeft.Value
wait(0.1)
end

8 comments
to negitive? You mean subtract?
You mispelled "ZombiesLeft" on the second one.You have it as "ZombieLeft"
Also, not sure if this is your actual code but- you put 'game.Workspace.ZombieLeft' instead of 'game.Workspace.ZombiesLeft' on the right side of the = sign.
wrap your code in Humanoid.Died event
i Dont UnderStand The Humanoid.Died event
Look at my answer PreloadContent
Its basically when the humanoid's health reaches 0. I think it also fires when you use the :BreakJoints() function
Use :Destroy().