TakeDamage (Method): Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>Legend26 |
>Flurite spelling and rewording |
||
Line 2: | Line 2: | ||
|name = TakeDamage | |name = TakeDamage | ||
|arguments = [[Number]] ''damage'' | |arguments = [[Number]] ''damage'' | ||
|description = Subtracts the damage from the health of the | |description = Subtracts the damage from the health of the targeted humanoid unless the character has a [[ForceField]]. | ||
|object = Humanoid | |object = Humanoid | ||
}}</onlyinclude> | }}</onlyinclude> | ||
Line 9: | Line 9: | ||
{{Example| | {{Example| | ||
<code lua> | |||
game.Players.LocalPlayer.Character.Humanoid:TakeDamage(99) -- '99' damage will be subtracted from the Humanoid's health. | game.Players.LocalPlayer.Character.Humanoid:TakeDamage(99) -- '99' damage will be subtracted from the Humanoid's health. | ||
</code> | |||
}} | }} | ||
[[Category:Methods]] | [[Category:Methods]] |
Revision as of 21:57, 30 January 2012
TakeDamage( Number damage ) | |
Returns | nil |
Description: | Subtracts the damage from the health of the targeted humanoid unless the character has a ForceField. |
Member of: | Humanoid |
Example
game.Players.LocalPlayer.Character.Humanoid:TakeDamage(99) -- '99' damage will be subtracted from the Humanoid's health.