Open Asterune
Health

Health

Stores health, damage, regeneration, and death state independently of movement.

Creatable
Instance.new("Health")
Inherits
Instance
Replication
Standard

Behavior

Health stores health, damage, regeneration, and death state independently of movement.

Summary

Members17
Properties9
Methods5
Events3
  • Damaged: RBXScriptSignalparallel read

    Fires when damage reduces health.

  • Died: RBXScriptSignalparallel read

    Fires when health enters the dead state.

  • Healed: RBXScriptSignalparallel read

    Fires when healing increases health.

Properties

BreakJointsOnDeath

Health.BreakJointsOnDeath: boolean = false

Whether character joints are broken when health enters the dead state.

Dead

Health.Dead: boolean = false

Whether this Health component is in its dead state.

DestroyDelay

Health.DestroyDelay: number = 0

The delay before destruction after death, in seconds.

DestroyOnDeath

Health.DestroyOnDeath: boolean = false

Whether the owning character or instance is destroyed after death.

Invulnerable

Health.Invulnerable: boolean = false

Whether ordinary damage is ignored.

MaxValue

Health.MaxValue: number = 100

The maximum health value.

Regeneration

Health.Regeneration: number = 0

The health restored per second during regeneration.

RegenerationDelay

Health.RegenerationDelay: number = 0

The delay after damage before regeneration resumes, in seconds.

Value

Health.Value: number = 100

The current health value.

Methods

GetExecutionGroup

Health:GetExecutionGroup(): ExecutionGroup?

Returns this instance if it is an ExecutionGroup. Otherwise returns the nearest ancestor ExecutionGroup, or nil when no group contains the instance.

Heal

Health:Heal(amount: number): number

Restores the requested amount of health up to MaxValue.

Kill

Health:Kill(): ()

Sets the health state to dead.

Revive

Health:Revive(value: number?): ()

Restores the Health component from its dead state.

TakeDamage

Health:TakeDamage(amount: number, source: Instance?): number

Applies damage through the Health component's protection and death rules.

Events

Damaged

Health.Damaged: RBXScriptSignal

Fires when damage reduces health.

Died

Health.Died: RBXScriptSignal

Fires when health enters the dead state.

Healed

Health.Healed: RBXScriptSignal

Fires when healing increases health.

Inherited members

Inherited47

Instance