I'm trying to make it so when a player dies the Dead Value adds 1 and the Alive value subtracts 1. Here is the script:
function onHumanoidDied(humanoid, player) game.Workspace.Dead.Value = game.Workspace.Dead.Value + 1 game.Workspace.Alive.Value = game.Workspace.Alive.Value - 1 end
What is wrong with it? If anyone would help I would be grateful! Edit: I figured it out.
I figured it out. This is what I ended up with:
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(char) char.Humanoid.Died:connect(function(died) Dead.Value = Dead.Value + 1 Alive.Value = Alive.Value - 1 end) end) end)