Restart while loop

I think this might not solve your issue, but try as I am curious to see if it does.

  1. check the afk status as you are currently checking the afk status of players using players[i]:WaitForChild("AFK").Value == false and this approach assumes that the AFK status is stored as a Boolean value under a child named “AFK” in each player’s data structure. so u should make sure that this is how you have set up your AFK system. Alternatively, you can modify this check to match your actual implementation.

  2. Inside the intermission loop, you have a typo in the line status.Value = "Intermission: "..ticket . It should be ticker instead of ticket . Additionally, you should exit the loop when the ticker reaches 0 or when the required conditions are met to start the match. Add a break statement after setting the status to “Minigame Selected! Teleporting Players…” to exit the loop.

also you were right (I have been coding like 10 different big module scripts so I’m tired) checking for AFK players wouldn’t directly help in determining if the match should start. The condition #nonafkplayers < 2 alone is sufficient to check if there are enough non-AFK players to start the match.

once again, for point 2. I have typed it rather than copying and pasting so it was fate that I made typos

that makes it harder for us to review the code then.

I will edit the script so it is perfect
@DecentAgent the script has been edited to its current state

the afk system works like epic minigames’s afk system
epic minigames

Question got answered a few posts up…? You’re just denying the solution for no reason.

The solution is to get the non afk players when intermission ends, NOT when the script starts running.

the loop restarts when conditions are not met

guess i’ll have to stick with loop restarting when ticker is 0

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.