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

1 answer

Log in to vote
0
Answered by
JakyeRU 637 Moderation Voter
5 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