PlayerAdded (Event): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
Small fixes
>Blocco
(Replaced example with example template.)
>Camoy
(Small fixes)
Line 1: Line 1:
{|
{|
|<onlyinclude>{{Event|name=PlayerAdded
|<onlyinclude>{{Event|name = PlayerAdded
|arguments=[[Instance]] ''Player''
|arguments = [[Instance]] ''player''
|description= Fired after a player enters the game.
|description = Fired after a player enters the game.
|object= [[RBX.lua.Players (Service)|Players]]
|object = [[Players]]
|}}</onlyinclude>
|}}</onlyinclude>
|}
|}


{{Example|
{{Example|
<pre>function onPlayerEntered(newPlayer)
<pre>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)</pre>}}
game.Players.PlayerAdded:connect(onPlayerEntered)
</pre>}}
Anonymous user

Navigation menu