#Death detection script only works once

9 messages · Page 1 of 1 (latest)

fickle cove
#

This script is supposed to change your team when you die. Does anyone know why it works once, but doesn't change your team the 2nd time you die?

slender wolf
#

you r checking when PLAYER joons not the player character

fickle cove
#

sry too late

#

i already fixed it

slender wolf
#

k

crude isle
#

that script may produce lag

lofty fog
#

why do u have a join event in a loop bro

#
players.PlayerAdded:Connect(function(plr)
  plr.CharacterAdded:Connect(function(char)
    char:WaitForChild("Humanoid").Died:Connect(function()
      print(string.format("%s died.", plr.Name))
    end)
  end)
end)