CharacterAdded (Event): Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>Camoy Shortened link |
>Camoy Example template used |
||
Line 12: | Line 12: | ||
== Usage == | == Usage == | ||
{{Example| | |||
<pre> | <pre> | ||
function onRespawn(character) | function onRespawn(character) | ||
Line 23: | Line 24: | ||
game.Players.PlayerAdded:connect(onPlayerEntered) | game.Players.PlayerAdded:connect(onPlayerEntered) | ||
</pre> | </pre> | ||
}} |
Revision as of 15:51, 28 August 2010
|
Description
The character will be a model with Humanoid, all body parts, scripts, and joints. The model will be completely loaded when triggered by game.
Usage
Example
function onRespawn(character) -- do something with character/backpack/etc. end function onPlayerEntered(newPlayer) newPlayer.CharacterAdded:connect(onRespawn) end game.Players.PlayerAdded:connect(onPlayerEntered)