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

Killer dies, round ends?

So, for the past 4 hours i've been trying to figure out how i'm gonna do this.. so i'm gonna ask here. How would i create a few lines of code that pretty much says "When the killer dies, the round ends." Please help.

Thanks. :)

1 comment

0

Erm, my learning lua

1 answer

✓ Accepted answer

This is the way I'd do it.

You probably have some kind of section in your code, that handles the killer assignement. Just add something along these lines to your previous code:

local event
event = chosenKiller.Character.Humanoid.Died:connect(function()
print("Killer has died!")

event:disconnect()
end)

That's about it. Now the chosenKiller should be the player you want to be the killer, and you should add additional checks, to test if humanoid exists. Else mark him as dead.

1 comment

0

THANK YOU! You have saved me so much time. :)

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