StatusAdded (Event): Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>ArceusInator page for StatusAdded |
>Camoy No edit summary |
||
Line 1: | Line 1: | ||
<onlyinclude>{{Event | |||
|name = StatusAdded | |||
|arguments = [[Status (Enum)|Status]] ''status'' | |arguments = [[Status (Enum)|Status]] ''status'' | ||
|description = Fired when an [[Enum]] [[Status (Enum)|Status]] is added to the [[Humanoid]]. | |description = Fired when an [[Enum]] [[Status (Enum)|Status]] is added to the [[Humanoid]]. | ||
|object = Humanoid | |object = Humanoid | ||
}}</onlyinclude> | |||
{{clear floats}} | |||
{{Example|<pre> | {{Example|<pre> | ||
function onStatusAdded( status ) | function onStatusAdded( status ) | ||
Line 22: | Line 24: | ||
</pre>}} | </pre>}} | ||
[[Category:Events]] |
Revision as of 20:05, 31 December 2010
![]() | |
Description | Fired when an Enum Status is added to the Humanoid. |
---|---|
Member of: | Humanoid |
Example
function onStatusAdded( status ) if status == Enum.Status.Poison then print "The humanoid is now poisoned!" elseif status == Enum.Status.Confusion then print "The humanoid is now confused!" end end humanoid = game.Players.LocalPlayer.Character.Humanoid humanoid.StatusAdded:connect( onStatusAdded ) humanoid:AddStatus( Enum.Status.Poison ) --> The humanoid is now poisoned!