I'm making a death screen GUI that would appear when the player dies, but it only works 1 time. People said that using loops is bad because the function will not stay to the player after the player have died once. So I'm using CharacterAdded. Why is my script not working?
game.Players.LocalPlayer.Character:WaitForChild('Humanoid').Died:connect(function(player)
player.CharacterAdded:connect(function(player)
text:TweenPosition(UDim2.new(0,0,0,0), 'Out', 'Quad', 0.5)
wait(6)
text:TweenPosition(UDim2.new(0,0,0,502), 'Out', 'Quad', 0.5)
end)
end)

4 comments
you might change the CharacterAdded:Connect() to CharacterAdded:Wait(), so it only runs once, until the player dies again
Yeah but, the gui still won't work
Maybe your GUI is broken
Try put the script inside StarterPlayer > StarterCharacterScripts