TakeDamage (Method): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>PurpleKiwi
Minor mistake: Damage is done to Health, not MaxHealth.
>SoulStealer9875
No edit summary
Line 9: Line 9:


{{Example|<pre>
{{Example|<pre>
game.Players.LocalPlayer.Character.Humanoid:TakeDamage(99) -- '99' is the amount of damage that character will take from their Health.
game.Players.LocalPlayer.Character.Humanoid:TakeDamage(99) -- '99' is the amount of damage that character will lose from their Humanoid's Health.
</pre>}}
</pre>}}


[[Category:Methods]]
[[Category:Methods]]

Revision as of 08:45, 9 July 2011

TakeDamage( Number damage )
Returns nil
Description: Subtracts the damage from the health of the targetted humanoid unless a ForceField is present.
Member of: Humanoid


Example
game.Players.LocalPlayer.Character.Humanoid:TakeDamage(99) -- '99' is the amount of damage that character will lose from their Humanoid's Health.