How can I make this function connect every time the player dies and not just the first time?
1 | local lp = game.Players.LocalPlayer |
2 | local character = lp.Character or lp.CharacterAdded:wait() |
3 | character:WaitForChild( "Humanoid" ).Died:Connect( function () |
5 | local frame = lp:WaitForChild( "PlayerGui" ).WastedGui.TweenedFrame |
6 | frame:TweenPosition(UDim 2. new( { 0 , 0 } , { . 5 , - 75 } ), 'Out' , 'Quad' , 1 ) |
8 | frame:TweenPosition(UDim 2. new( { 0 , 0 } , { - 1 , - 75 } ), 'Out' , 'Quad' , 1 ) |
this script only works the first time the player dies.