local i = 1 repeat print(i.." seconds left!") i = i + 1 wait(1) if i == 61 then local pl = workspace:FindFirstChild("Player") if pl then local hum = pl:FindFirstChild("Humanoid") if hum then hum.Health = 0 end end break end until i == 61
There is an instant problem with your script. During the repeat, you're just printing 1 constantly.
You need a while loop.
Also, for the game.Players.LocalPlayer to work, you need to put this into a localscript.
Note that it kills the humanoid.
local i = 60 while i > 0 do -- goes through the loop until i is 0. print(i.." seconds left!") i = i - 1 end if i == 0 then local pl = game.Players.LocalPlayer local character = pl.Character if pl then local hum = pl:WaitForChild("Humanoid") -- Waiting until the humanoid is found. if hum then hum.Health = 0 end end
Note that you should only use break if you're in a while loop.
-- Hydroid18 (Using my alt until I can get help from the SH staff with my account.)