Hey guys. Ive been working on a lobby for my game. I have a sign that is supposed to say how many players are online. Inside of the sign is this script:
while true do
wait (0.2)
if game.Players.NumPlayer.Value == 1 then
script.Parent.Text.SurfaceGui.TextLabel.Text = "There is only " ..game.Players.NumPlayer.Value.. " player online today :( "
else
script.Parent.Text.SurfaceGui.TextLabel.Text = " There are " ..game.Players.NumPlayer.Value.. " players online today :)"
end
end
and inside the players section of the game aka game.Players, is a NumValue that is supposed to index the number of players so that the sign will say the number of players. the sign script seems to work fine, but the script inside the Number Value seems to be wrong. here is what i have so far:
local plr = Game.Players:GetChildren()
while true do
wait (0.5)
for i = 1, #plr
local NumPlr = plr.Value
script.Parent.Value = NumPlr
end)
Now I know i have the basic idea here. But something seems not to work. Can someone help please??
|