well, if u look at a leaderboard, you find this somewhere in it
humanoid.Died:connect(function() onHumanoidDied(humanoid, newPlayer) end )
which calls the function on humanoid died, as well as sending that function information so it can update stats. anyhow, the connection to call your function everytime you die would be:
humanoid.died:connect([your function here])
humanoid happens to be the path:
newPlayer.Character.Humanoid
where newPlayer is:
game.Players.ChildAdded
which happens to call a function...
anyways, you probably want the path:
x.Character.Humanoid.Died([function(x)])
somewhere in your script and at the end:
game.Players.ChildAdded:connect([mainfunction])
and pass x on in your function:
function function(x)
and
function mainfunction(x)
i think, maybe you understand it batter.... |