I want to make a counter to make the game start, but my code doesn't works, I have a text label and inside it this script
local plrcount = 0 -- Define the number at first.
for i,v in pairs(game.Players:GetChildren()) do
if v:IsA("Player") then -- Check if it's a player.
plrcount = plrcount+1 -- Update the player count.
end
end
contador = 10
if plrcount > 1 then
while contador == 0 do
contador = contador - 1
end
end
function updatevalue()
script.Parent.Text = contador
end
script.Parent.Value.Changed:Connect(updatevalue)