I do have a mini-function I made that fires when the player dies, but it only runs once and stops after that.
1 | game.Players.LocalPlayer.Character.Humanoid.Died:connect( function () |
2 | print ( "You have died!" ) |
3 | end ) |
Is there a way to make something like this continue?
Yeah.
Put the following LocalScript into StarterPlayerScripts:
1 | game.Players.LocalPlayer.CharacterAdded:Connect( function (char) |
2 | char:WaitForChild( "Humanoid" ).Died:Wait() |
3 | print 'You have died!' |
4 | end ) |
The issue with your script is that the Character your script is referring to gets removed when the player dies.