while true do if game.ReplicatedStorage.Players == 1 then -- this nummer value is in dah repilicated storage wait(1) game.StarterGui.ScreenGui.Frame.TextLabel.Text = "You need 2 players to start a round" end game.StarterGui.ScreenGui.Frame.TextLabel.Text = "Round Starting Soon" end
Firstly you shouldn't store a value of the amount of players in ReplicatedStorage, it's pointless.
Let's create the variables
.
local label = game.StarterGui.ScreenGui.Frame.TextLabel
Now let's check if there is only one or less people in the lobby. If not, we'll update the label.
while game.Players.NumPlayers < 2 do label.Text = "You need 2 players to start a round" repeat wait() until game.Players.NumPlayers >= 2 -- Wait until the minimum amount of players have joined. end
Full Code:
local label = game.StarterGui.ScreenGui.Frame.TextLabel while game.Players.NumPlayers < 2 do label.Text = "You need 2 players to start a round" repeat wait() until game.Players.NumPlayers >= 2 end