How to kill the player once the timer reaches a certain limit?
Asked by
4 years ago Edited 4 years ago
Hey there! I'm trying to figure out how to make the player have health on 0 (therefore, killing the player) once a timer reaches by, lets say, 10 minutes. I couldn't figure this out.
if mins >= 10 and seconds >= 0 then
hum.Health = 0
This however doesn't work. Usually my time is around 0 to start. but the script sets the time to 10:00, Immediately killing the player once they spawn.
12 | script.Parent.Text = tostring (mins).. ":0" .. tostring (seconds) |
14 | script.Parent.Text = tostring (mins).. ":" .. tostring (seconds) |
17 | until mins > = 10 and seconds > = 0 |
18 | if mins > = 10 and seconds > = 0 then |
19 | local chr = game.Players.LocalPlayer.Character |
20 | local hum = chr.Humanoid |