PlayerAdded (Event): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Camoy
Fixed return type
>Camoy
Tabbed
Line 9: Line 9:
{{Example|<pre>
{{Example|<pre>
local function onPlayerEntered(newPlayer)
local function onPlayerEntered(newPlayer)
wait(10)
  wait(10)
newPlayer.Character.Torso.Transparency = 1
  newPlayer.Character.Torso.Transparency = 1
end
end


game.Players.PlayerAdded:connect(onPlayerEntered)
game.Players.PlayerAdded:connect(onPlayerEntered)
</pre>}}
</pre>}}

Revision as of 18:07, 29 August 2010

PlayerAdded ( Player player )
Description Fired after a player enters the game.
Member of: [[RBX.lua.Players (Object)|Players]]
Example
local function onPlayerEntered(newPlayer)
  wait(10)
  newPlayer.Character.Torso.Transparency = 1
end

game.Players.PlayerAdded:connect(onPlayerEntered)