In this script how do I make a countdown so I can connect it to a string?
wait(1)
function movePlayers()--Don't mess with this
local player = game.Players:GetPlayers()
for i = 1, #player do
player[i].Character:MoveTo(Vector3.new(-16, 0.5, -48))
end
end
game.Players.PlayerAdded:connect(function(char)
local hint = Instance.new("Hint")
for i = 30, 1, -1 do
repeat wait(1)
if game.Players.NumPlayers >= 2 then--Change the 2 to the number of players you want to start the game
hint.Parent = game.Workspace
hint.Text = ("Starting the game in "..i.." seconds")--I want to have it as ("Starting game in "..i.." seconds")
else
hint.Text = ("Waiting for players...")
end
until i == 0
movePlayers()
hint.Parent = game.Lighting
end
end)
