function Fire()
print("Kill em all!")
local players = game.Players:GetChildren()
for i=1,#players do
if players[i].Character ~= nil then
print("...")
players[i].Character.Humanoid.Health:TakeDamage(100)
end
end
end
while wait(.5) do
Fire()
end
It works but you're only making them take 1 damage. When you need 100 to kill.
And for a more efficient method I would do this:
function Fire()
for i, v in pairs(game.Players:GetChildren() do
if v.Character then
v.Character.Humanoid.Health = 0
end
end
end
while wait(.5) do
Fire()
end
now for a slow death:
function Fire()
for i, v in pairs(game.Players:GetChildren() do
if v.Character then
repeat v.Character.Humanoid.Health = v.Character.Humanoid.Health - 1
wait(.1)
until v.Character.Humanoid.Health = 0
end
end
end
while wait(.5) do
Fire()
end
1 comment
It still won't work...