I'm making a fighting game and I want there to be a new round to restart after someone dies.
✓ ANSWER ACCEPTED
How does someone Restart a game after someone dies?
1 answer
✓ Accepted answer
I cannot really help you with the lack of detail in your request, but I can at least try.
game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(c)
if c:WaitForChild("Humanoid"):GetState() ==Enum.HumanoidStateType.Dead then
print("Dead")
end
end)
end)
In this code, we run off of the PlayerAdded event. The parameter "p" is the player. Skipping a line, we check to see if the Humanoid's state is "Dead". If true, then the server prints "Dead" to output.
Again, I can't really help you without seeing what you are trying to do exactly, but I hope this helped a bit!
This discussion is preserved as it was. New answers, comments, and votes are closed.
