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?
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?
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)
This discussion is preserved as it was. New answers, comments, and votes are closed.
9 comments
if it is in a local script the print wont work
Probably a FE problem, put it in a server script, not LocalScript, and place it in ServerScriptService
yh mate, print doesnt work in local scripts
level 2 scripter.
Don't be mean, he may be new...
level -infinity scripter.
Press X to doubt
PlayerAdded doesn't work for the client running the LocalScript.
And @stinkyest11 you were once a level 2 scripter, I was, everyone is, was, or will be one.