Disable Health Regain

Hello I’m currently making a game in which if a player loses health they have to buy a gamepass or go further in the game to restore their health.I have currently made a script but it isn’t working can you help me out?

This is my current script.

Script:
game.Players.PlayerAddded:connect(function(player)
player.Character.CharacterAdded:connect(function(character)
character:WaitForChild(“Health”).Disabled = true
end)
end)

Why not just :Destroy() the health script? You can also just place a script in StarterCharacterScripts as an empty script or you can implement your own healing logic.

  • You misspelled the PlayerAdded event, it’s not PlayerAddded
  • connect is deprecated, use Connect (capital C) instead
  • A player’s Character doesn’t have a health instance, it’s rather a property of the Humanoid
  • A humanoid’s health does not have a disabled property, it’s a property in itself

To make a player invincible, disable the death state.

Disable regeneration:

3 Likes