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

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

Asked by
Irvene 5
9 years ago

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
0
Goulstem answered your question: use the Died event. Redbullusa 1580 — 9y

1 answer

Log in to vote
1
Answered by
Goulstem 8144 Badge of Merit Moderation Voter Administrator Community Moderator
9 years ago

Use the Died event of the humanoid.

More info here

0
It's a function.... Irvene 5 — 9y
1
What? Goulstem 8144 — 9y
0
How do you use a died event inside of a function? Irvene 5 — 9y
1
You don't, why would you need to? The Died Event activates whenever the specified humanoid Dies. Goulstem 8144 — 9y
Ad

Answer this question