Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Can't pick the winner, why won't this method work?

I have a function that waits until a player dies, but it doesn't find out if the player dies or not it just waits over and over, it doesn't end if a player dies. How can I fix this?

repeat wait() until plr1.Character.Humanoid.Health == 0 or plr2.Character.Humanoid.Health == 0

1 comment

0

Goulstem answered your question: use the Died event.

1 answer

Use the Died event of the humanoid.

More info here

4 comments

0

It's a function....

1

What?

0

How do you use a died event inside of a function?

1

You don't, why would you need to? The Died Event activates whenever the specified humanoid Dies.

This discussion is preserved as it was. New answers, comments, and votes are closed.