Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Help with a PlayerAdded Function?

Asked by
CyDave 42
6 years ago

Hello, I wrote a script that when a player is added something happens but it doesn't work, here it is:

game.Players.PlayerAdded:Connect(function(player)
    print("yay")
end)

Does anyone know how to fix it?

1
if it is in a local script the print wont work okbigbooi -6 — 6y
1
Probably a FE problem, put it in a server script, not LocalScript, and place it in ServerScriptService Next_Byte 21 — 6y
0
yh mate, print doesnt work in local scripts stinkyest11 78 — 6y
0
level 2 scripter. stinkyest11 78 — 6y
View all comments (5 more)
0
Don't be mean, he may be new... mixgingengerina10 223 — 6y
0
level -infinity scripter. AlphaGamer150 101 — 6y
0
Press X to doubt Vulkarin 581 — 6y
0
PlayerAdded doesn't work for the client running the LocalScript. User#19524 175 — 6y
0
And @stinkyest11 you were once a level 2 scripter, I was, everyone is, was, or will be one. User#19524 175 — 6y

1 answer

Log in to vote
0
Answered by
JakyeRU 637 Moderation Voter
6 years ago

Hello. Create a Script and put it in ServerScriptService. Then write your code. Here is an example:

game.Players.PlayerAdded:Connect(function(player)
    print("Welcome"..player.Name)
end)
Ad

Answer this question