How do I make all players take continuous damage over time. For example 5 damage every 10 seconds up until they die
✓ ANSWER ACCEPTED
how do i damage all players continuously using the repeat until script?
1 answer
✓ Accepted answer
If it is continuous then this should work.
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
repeat char.Humanoid.Health = char.Humanoid.Health - 5 wait()
until char.Humanoid.Health = 0
end)
end)
You may consider adding :FindFirstChild before Humanoid but I would suggest researching that first as I am unsure.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
You need to add a wait or else it won’t be so continuous..