I test the game with a friend, and the Server console keeps printing Not Enough Players, confirming something's not right. I have tried using methods like GetChildren from Players, and for i,v etc.
local plrs = game.Players.NumPlayers
while true do
wait(6)
if plrs == 2 or plrs >= 2 then
print("Enough Players. Begininning Minigame process.")
local RandomChoice = script.Random:GetChildren()
local RoundChoseWay = RandomChoice[math.random(#RandomChoice)]
GetRoundChoser(RoundChoseWay)
else
print("Not Enough Players")
end
end
function GetRoundChoser(RoundChoseWay)
if RoundChoseWay == "Auto" then
local Minigames = script.Parent.Minigames:GetChildren()
local MinigameChosen = Minigames[math.random(#Minigames)]
ExecuteRound(MinigameChosen)
print(MinigameChosen)
elseif RoundChoseWay == "Vote" then
local Minigames = script.Parent.Minigames:GetChildren() -- Delete when Vote system is done.
local MinigameChosen = Minigames[math.random(#Minigames)]
-- Vote for minigame todo.
ExecuteRound(MinigameChosen)
print(MinigameChosen)
end
end
function ExecuteRound(MinigameChosen)
if MinigameChosen == "BombSurvival" then
end
end

1 comment
So the issue is getting the number of players?