Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

How do I change the health of the players in my game?

Asked by 8 years ago

I want the players to have more than 100 health. How do I do this? (Include the script in your answer).

0
Question answered. For future reference, manners are appreciated. Brinceous 85 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

You'd need to use the PlayerAdded and CharacterAdded event. Something like this:

game.Players.PlayerAdded:connect(function(player)
    player.CharacterAdded:connect(function(character)
        character.Humanoid.MaxHealth = 1000
        character.Humanoid.Health = 1000
    end)
end)
Ad

Answer this question