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

It keeps Printing 0 Instead of the amount of player's in the server Anyone Know Why? [closed]

Asked by 4 years ago
Edited 4 years ago

Please provide more explanation in your question. If you explain exactly what you are trying to accomplish, it will be much easier to answer your question correctly.

It keeps Printing the value 0 I tried to edit it a few times to fix it but nothing i do seems to work anyone know why? Its supposed to print the amount of player's in the server

PlayersInServer = {}
game.Players.PlayerAdded:Connect(function(Player)
    local PlrAmount = #game.Players:GetChildren() + 1
    table.insert(PlayersInServer,PlrAmount,Player)
print(#PlayersInServer)
end)

That's the entire script Its a normal script not a local script

Closed as Non-Descriptive by JesseSong

This question has been closed because its title or content does not adequately describe the problem you are trying to solve.
Please ensure that your question pertains to your actual problem, rather than your attempted solution. That is, you were trying to solve problem X, and you thought solution Y would work, but instead of asking about X when you ran into trouble, you asked about Y.

Why was this question closed?