CharacterAdded (Event)

From Legacy Roblox Wiki
Revision as of 13:42, 9 January 2011 by >Emess
Jump to navigationJump to search
CharacterAdded ( Instance character )
Description Fired when a character spawns or respawns.
Member of: Player

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.

Example
local function onRespawn(character)
  --do something on respawn
end

local function onPlayerEntered(newPlayer)
  newPlayer.CharacterAdded:connect(onRespawn)
end

game.Players.PlayerAdded:connect(onPlayerEntered)