local PlayerCharacter, Humanoid
repeat
PlayerCharacter = Player.Character
until PlayerCharacter
repeat
Humanoid = PlayerCharacter:FindFirstChildOfClass("Humanoid")
until Humanoid
local OldCharacter = PlayerCharacter
-----------------------------------------------------------------------
Humanoid.Died:Connect(function()
PlayerCharacter = nil
repeat
PlayerCharacter = Player.Character
until PlayerCharacter and PlayerCharacter ~= OldCharacter
OldCharacter = PlayerCharacter
repeat
Humanoid = PlayerCharacter:FindFirstChildOfClass("Humanoid")
until Humanoid
end)
Does this piece of script can detect respawned player’s character?