CharacterAdded (Event): Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>GoldenUrg reformat; added example |
>Camoy Shortened link |
||
Line 4: | Line 4: | ||
|arguments = [[Instance]] ''character'' | |arguments = [[Instance]] ''character'' | ||
|description = Fired when a character spawns or respawns. | |description = Fired when a character spawns or respawns. | ||
|object = [[ | |object = [[Player]] | ||
|}}</onlyinclude> | |}}</onlyinclude> | ||
|} | |} |
Revision as of 15:45, 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
function onRespawn(character) -- do something with character/backpack/etc. end function onPlayerEntered(newPlayer) newPlayer.CharacterAdded:connect(onRespawn) end game.Players.PlayerAdded:connect(onPlayerEntered)