I think this might not solve your issue, but try as I am curious to see if it does.
-
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. -
Inside the intermission loop, you have a typo in the line
status.Value = "Intermission: "..ticket
. It should beticker
instead ofticket
. Additionally, you should exit the loop when the ticker reaches 0 or when the required conditions are met to start the match. Add abreak
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.