How do I make this work? It only gets set to 100 and not to full heatlh
1 | player = game.Players.LocalPlayer |
2 |
3 | game.Players.PlayerAdded:connect( function (player) |
4 | player.CharacterAdded:connect( function (character) |
5 | character.Humanoid.Health = character.Humanoid.MaxHealth |
6 | end ) |
7 | end ) |
I don't know why you would ever want to do that, but...
I think you just got two scripts mixed up. It's supposed to look like this:
1 | game.Players.PlayerAdded:connect( function (player) |
2 | player.CharacterAdded:connect( function (character) |
3 | character.Humanoid.Health = character.Humanoid.MaxHealth |
4 | end ) |
5 | end ) |
And also, every humanoid has a died event. Might come in handy.