hey guys, so im trying to make a script that updates the value of an IntValue, which is supposed to be the number of players in the game, I feel like the script should be pretty simple, so I did this
local plrInGame = script.Parent.Value
while wait(1) do
plrInGame.Value = #game.Players:GetChildren()
end
However, when I do that I get the "Attempt to index number with 'Value'" error, anyone got a clue?

1 comment
use for i,v in pairs(game.Players:GetChildren())