game.Players.PlayerAdded:Connect(function(p)
print(p.Name.." joined!")
end)
I've heard the saying that modules only run once. So would this not work?
game.Players.PlayerAdded:Connect(function(p)
print(p.Name.." joined!")
end)
I've heard the saying that modules only run once. So would this not work?
This code will run in a ModuleScript if you require it.
You can run any code inside of a module script when requiring it, but this is an Event that is set off and continues to get set off no matter what script it's in.
Here is what it looked like when I tried it myself:
https://gyazo.com/4f24ec26331cbb6aac3d136abed85bc6
Although, for any module to run you will need a script to require it, so I don't see why you don't put it in the regular script to begin with.
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
Well I haven't tried but I'd say it'll work. Don't all scripts run once?