function Hello () print (game.Players.NumPlayers) end game.Players.PlayerAdded:connect(Hello)
So I just started a few days ago learning to program and this is my first script so far and I don't know whats wrong with this!?!
P.s I am using a local script if that means anything.
Local Scripts are client-specific, meaning they need to be a descendant of a player to run. Server Scripts run on the server, meaning they can run anywhere. Just put your code in a Server Script (Default Script) and it should work just fine.
Try using this script on a server script and should help work if not reply back.