This might be impossible but I am wondering if you can check if someone clicked reset in the menu. Thanks, KIheros
This assumes that you have made all of the scripts in your game
If you didn't kill them, it's probably not unfair to say that they might have killed themselves. When Humanoid.Died fires, check if one of your scripts killed the humanoid (You'll need to set up a broadcast or BoolValue or something to tell scripts that we're looking at murder). If it wasn't one of your scripts, then they reset.
As an example, you can have a suicide watch script like this
game.Players.PlayerAdded:connect(function(p) p.CharacterAdded:connect(function(c) local hum = c:WaitForChild("Humanoid"); local murder = Instance.new("BoolValue"); murder.Name = "Murder"; murder.Value = false; murder.Parent = hum; -- local torso = c:WaitForChild("Torso"); hum.Died:wait(); if murder.Value then -- Killed by a script else -- Suicide end; end); end);
And then in a killing script you can write this
if humanoid then -- Ayy let's get 'im humanoid.Murder.Value = true; humanoid.Parent:BreakJoints(); end
There is one more possibility, which is that the Player jumped off the edge. To catch that, try this:
(Assumes that you've got a Torso predefined from the CharacterAdded with `local torso = c:WaitForChild("Torso"))
else -- If it's not murder if torso.Position.Y < workspace.FallenPartsDestroyHeight then -- Also not murder, unless they were pushed, but not a reset. else -- Reset. end; end;