Hello, Im trying to make a respawn screen with Humanoid.Died and it works for the first time but doesn’t for the second time. I was wondering if someone could help me.
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local Humanoid = character:WaitForChild("Humanoid")
Humanoid.Died:Connect(function()
PlayDeathTween()
respawnBase:TweenPosition(UDim2.new(0.5,0,1.2,0),Enum.EasingDirection.In, Enum.EasingStyle.Linear)
respawnEvent:FireServer()
end)
Humanoid will reset when player die, so you must do
Player.CharacterAdded:Connect(function(character)
character:WaitForChild("Humanoid").Died:Connect(function()
print("Player died") --this will print when player die
end)
end)
game.Player.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(character)
character:WaitForChild("Humanoid").Died:Connect(function()
print("Player died") --this will print when player die
end)
end)
end)