What do you want to achieve? I want the game to say how many players there are and if there are more than 2 players in the game the intermission will countdown. And after the countdown it says Games begin!
What is the issue? The script doesn’t work.
What solutions have you tried so far? Changing the script.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
if #game.Players:GetPlayers() < 2 then
game.StarterGui.ScreenGui.TextLabel.Text = "Not enough players in the game"..#game.Players:GetPlayers()"/2"
end
for i = 30,1,-1 do
game.StarterGui.ScreenGui.TextLabel.Text = "Intermission "..i
wait(1)
end
game.StarterGui.ScreenGui.TextLabel.Text = "Game begins"
I think the problem is somewhere above where i wanted to know the numbers of players in the game. Because before i put if #game.Players:GetPlayers() < 2 then game.StarterGui.ScreenGui.TextLabel.Text = "Not enough players in the game"..#game.Players:GetPlayers()"/2" It worked just fine with the other code. I appreciate you for helping
game.Players.PlayerAdded:Connect(function(player)
repeat wait(1)
player.PlayerGui.ScreenGui.TextLabel.Text = "Not enough players in the game"..#game.Players:GetPlayers().."/2"
until #game.Players:GetPlayers() < 2
for i = 30,1,-1 do
player.PlayerGui.ScreenGui.TextLabel.Text = "Intermission "..i
wait(1)
end
player.PlayerGui.ScreenGui.TextLabel.Text = "Game begins"
end)
The script is pretty much your script that you posted the reply above me, I just fixed some mistakes you made like doing game.PlayerGui instead of player.PlayerGui, so to get the player I wrapped it in a player added event. Lastly I changed it to use a repeat wait() until instead of your if statement so that it will keep checking until there is more than 2 players, instead of checking one time, then continuing the code. Theres your explanation so now its perfectly allowed lol