so i was using the wait part of the script from yours but you have it as if there is not a players then the entre function returns and my brain doesn’t want to help me figure out what is to stop that so is there a way on the top your head that you can think of
Code Example
function Shared.Wait()
task.wait(2)
while task.wait(1) do
print("If Not Enough Players Was Just Said There Is N Bug Here") -- prints at the start
if CountPlayers() >= MIN_PLAYERS and not RoundOn then
print("Max Players")
task.wait(1)
FailedRemote:FireAllClients(75)
print("Fired Event")
elseif not RoundOn then
print("Not Enough Players") -- prints once then the first print doesn't print anymore
FailedRemote:FireAllClients(2063)
return
end
Round()
RoundOn = true
wait(5)
end
end
set the min player to the amount, if you were to set it to two, you would need 3 players as the amount of player neeeds to be greater then 2
for example
if you were to set the min player to 1 then 2 players need to join or else it will think that it doesnt work
heres the solution
if #players >= MinPlayers and not roundOn then
print("Max Players")
task.wait(1)
SetUpRound:FireAllClients()
print("Fired Event")
elseif not roundOn then
print("Not Enough Players")
return
end
the problem is in this bitelseif not roundOn then print("Not Enough Players") return end the return it jus stops the whole function so even if another player joins it doesn’t play (its in a module)
while task.wait(1) do
print("If Not Enough Players Was Just Said There Is N Bug Here") -- prints at the start
if CountPlayers() >= MIN_PLAYERS and not RoundOn then
print("Max Players")
FailedRemote:FireAllClients(75,TIME_WAITIING)
task.wait((TIME_WAITIING-3))
StartSoundSFX:Play()
task.wait(3)
R.Round()
RoundOn = true
print("Fired Event")
elseif not RoundOn then
print("Not Enough Players") -- prints once then the first print doesn't print anymore
FailedRemote:FireAllClients(2063)
end
end
``` anyway thank you for the help!