Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What is the correct way to make rounds repeat until a certain amount of players are left?

Asked by 5 years ago
Edited 5 years ago

For example, I want my game to eliminate someone and then repeat until 3 or so people are left, and then they compete in a final round. I have tried numerous different ways, but they all just end up breaking the game. I am using the teams the players are set on in order to get the amount of players currently competing. Here is an example of how I've been trying to achieve this:

local team = game.Teams.TeamName:GetPlayers())

--Game gets to the point of checking number of players
while #team >= 3 do
        --Execute this chunk of code and then repeat until its false
end
--Then the game continues   

I'm extremely new to LUA, so it might be something very obvious that I'm not aware of.

0
You have to get the character's Humanoid and check if they are dead first, Somereason I can't post answers so your on your own. seith14 206 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

According to Lua:

"Lua" (pronounced LOO-ah) means "Moon" in Portuguese. As such, it is neither an acronym nor an abbreviation, but a noun. More specifically, "Lua" is a name, the name of the Earth's moon and the name of the language. Like most names, it should be written in lower case with an initial capital, that is, "Lua". Please do not write it as "LUA", which is both ugly and confusing, because then it becomes an acronym with different meanings for different people. So, please, write "Lua" right!

Have some respect for Lua. It’s not LUA.

I will edit my answer with a legitimate answer once you edit your question to say Lua, not LUA.

0
LOL get real. The fact that you took time out of your life just to say that is pretty pathetic. I'd rather not be helped by someone with an entitled attitude like yours :) hauntedwaves 0 — 5y
0
Not my fault you’re uneducated and inconsiderate. User#19524 175 — 5y
Ad

Answer this question