Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

IF then Break Statement not working?

Asked by 3 years ago

i know why this is happening its because the player respawns before the time checks if i set wait to 1 second it works fine i need it at 30 how do i work around this

while player.Character.Humanoid.Health > 0 do
            if player.Character.Humanoid.Health == 0 then 
                break
            end
            game:GetService("Chat"):Chat(player.Character.Head, Strings[math.random(1, #Strings)])
            wait(30)
        end

Answer this question